getData()); try { $response = $dispatcher->dispatch( $_SERVER['REQUEST_METHOD'], parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) ); echo $response; } catch (HttpRouteNotFoundException $e) { header('Location: /404'); die(); } catch (HttpMethodNotAllowedException $e) { header('HTTP/1.0 403 Forbidden'); die(); }