owncloud/core — pull request #5027 by tanghus (2013-09-27 23:50:57+00:00)
Title: Enhance request

One moar against `appframework-master`:

* Add patch method to OC_Route
* Exception when e.g. accessing $request->get if the current HTTP method is POST. Makes it a helluva lot easier to find errors in your cut'n'paste code ;)
* Add patch method to OC_Route
* Add PATCH and PUT accessors to Request. PATCH returns an array like GET and POST. PUT returns a once-only respource.
* Document accessors in IRequest.
* And unit tests :smile_cat:

I though a lot about what to do with the `php://input` that can only be read once, and I think this is the best approach. PATCH requests are per definition not big - otherwise you're Doing It Wrong - and if properly documented a stream resource for PUT makes most sense. I though about making it conditional either by an argument or by the size of the request body, but it would just be too obfuscated what you would actually get.

@DeepDiver1975 @Raydiation @bartv2