Re: New globals for PUT and DELETE
| From: | Rowan Collins | Date: | Tue, 14 Oct 2014 15:49:30 +0000 |
| Subject: | Re: New globals for PUT and DELETE | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-78026@lists.php.net to get a copy of this message | ||
Alain Williams wrote (on 14/10/2014):
On Tue, Oct 14, 2014 at 01:54:55PM +0100, Andrea Faulds wrote:You have misunderstood: the request body is the data sent with the HTTP request, separate from the URL.On 14 Oct 2014, at 13:47, Kris Craig <kris.craig@gmail.com> wrote:Unless I have misunderstood what you are saying ... as a developer I do want to know the difference between fields in a POST form and query items on the URL. I will sometimes use them together, eg:Hey guys, Does anybody know why we have $_GET and $_POST, but not $_PUT and $_DELETE? As far as I can tell, the only way to get these out currently is to parse their values by reading the incoming stream directly. Is there a reason why we don't want this or is it just that nobody has actually written it yet?$_GET and $_POST are really misnomers. $_GET is query string parameters, $_POST is request body data. We should just put the request bodies for all requests, not just POST, into $_POST.<form action="?context=something" method="post" > ...and specifically check $_GET['context'] - there might be a $_POST['context'] but that is treated completely differently.