Re: Native support - PUT request, multipart form data

From: Date: Sun, 17 Aug 2014 02:18:22 +0000
Subject: Re: Native support - PUT request, multipart form data
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-76599@lists.php.net to get a copy of this message
Since we get JSON data, I would also consider $_JSON. Regards Thomas Park Framework wrote on 17.08.2014 01:47: > Variable $_PUT is already a popular name. > Many for yourself already so it was called, at the bottom link. > http://stackoverflow.com/search?q=PHP+%24_PUT > > But I like the name $_DATA - it is universal for any request method. > For frontend developers, this name is very clear: > $.ajax({ > type: "PUT", > contentType: "application/json", > data: {"name": "value"} > }); > > Except multipart form data, needed and native support for application/json. > > In many languages (Java, Python, ASP), it has long been there. > It is a pity that the PHP in 2014, it has not yet implemented. > > > > 2014-08-17 2:14 GMT+03:00 Chris Wright <cw@daverandom.com>: > >> On 16 August 2014 23:41, Park Framework <park.framework@gmail.com> wrote: >> > This is necessary for convenient use RESTful API. >> > >> > file_get_contents('php://input') - Very inconvenient >> > >> > I would like to finally get native support for PHP, preferably version >> 5.6 >> >> The window for getting new features into 5.6 has passed, quite a long time >> ago. >> >> Also, there is no $_PUT superglobal (and personally I do not think >> there should be one), and it would not make sense to put this data >> into $_POST (or any existing superglobal). Please explain the API you >> envisage to get this working. >> >

« previous php.internals (#76599) next »