Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return arrays where possible for getParsedBody()
This fixes the weird case that if you POST, then getParsedBody() will have an array in it ($_POST), but if you PUT or have json, then getParsedBody() will have an object. Even more weirdly, if you POST with the hidden _METHOD=PUT, you get an array in your put() handler, but if you PUT to it you get an object. It's much more consistent to try to always make it an array and ensures that we can also handle keys with hyphens much more sanely as they are horrible to deal with when in a stdClass.
- Loading branch information