marcj / php-rest-service

Php-Rest-Service is a very simple and fast PHP class for server-side RESTful JSON APIs.
MIT License
216 stars 74 forks source link

summary of all routes problem #32

Closed espekkaya closed 7 years ago

espekkaya commented 7 years ago

Hi, You said that as "Can return a summary of all routes or one route through OPTIONS method based on PHPDoc (if OPTIONS is not overridden)"

But I have called class like that; \RestService\Server::create('/recipe', '\CorsApi\Recipe') ->collectRoutes() ->run();

and my url is "http://localhost:8080/sample/restApi/recipe/" but server returns json content is ; { "status": 400, "error": "RouteNotFoundException", "message": "There is no route for ''." }

How can I show all available methods? I haven't figured it out.

Thank you.

marcj commented 7 years ago

you nee to use HTTP OPTIONS, not HTTP GET

espekkaya commented 7 years ago

Thank you Marcus.Problem is solved.