post("_method", $input->get("_method"))) { case "put": return "put"; case "delete": return "delete"; default: return "post"; } } } /** * Choose an output format based on what the client prefers to accept. * @return string "html", "xml" or "json" */ public static function output_format() { // Pick a format, but let it be overridden. $input = Input::instance(); return $input->get( "_format", $input->post( "_format", request::preferred_accept( array("html", "xml", "json")))); } }