Never use an array at the root of an API

A 1 minute read, Posted by Thomas Brennetot on Tue, Apr 29, 2014
In
Tags api, php, symphony

The reason for not using an array at the root of an API is the fact that it is not extensible.

For the company where I work certainly request http do not pass (DELETE, PUT, PATCH) in some users. Symfony re-routes the POST request with the “_method” parameter. With an array, it’s not possible …

[EDIT 2019-07-09] Migrated from Tumblr from French.