Re: New globals for PUT and DELETE
| From: | Rowan Collins | Date: | Tue, 14 Oct 2014 13:20:08 +0000 |
| Subject: | Re: New globals for PUT and DELETE | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-77980@lists.php.net to get a copy of this message | ||
Kris Craig wrote (on 14/10/2014):
The problem with that approach though is that it would not be RESTful. I'm developing a REST API (with the goal of 100% REST compliance) and having PUT/DELETE variables mixed in with $_POST would not only be counter-intuitive, but it would just present a new roadblock.This makes no sense; there is no such thing as "PUT/DELETE variables" in HTTP, any more than there is such things as "POST variables". Just imagine that the variables are called $_QUERY_STRING and $_REQUEST_BODY. They should be completely orthogonal to the request method. Note that this is already true to an extent - you can access the query string through $_GET on a POST request, and $_POST will exist as an empty array.