url; $query = ""; if(strpos($path, "?") !== false) { list($path, $query) = explode("?", $path); } if($req->method != "GET") { return new Response(405); } if(preg_match("<^/?$>",$path)) { return new Response(200, ['v1-2']); } else { return new Response(404); } } }