Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
You could edit your .htaccess to strip trailing slashes.
Otherwise, I'm pretty sure that symfony's router has a config to do it. -
Rocket3G2008y@spongessuck shouldn't /companies return all companies, and /company/1 return the company with ID 1?
-
antons7858y@Rocket3G no. It has to be the same resource, and I believe the convention is to use plural. In this case /companies/ returns everything and /companies/{id} returns a single company. There is a github repo about this called WhiteHouse API or something similar
Related Rants
curl myapi.com/company --> 404
curl myapi.com/company/ ---> 200
fuck it. I give up.
undefined
fuck it
php
symfony2