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