Re: [PHP-DEV] Native support - PUT request, multipart form data

2014-08-18 Thread Larry Garfield
On 08/17/2014 03:55 PM, Chris Wright wrote: On 17 August 2014 11:49, David Zuelke wrote: That does not make any sense; applications could accept XML, CSV or whatever else just as well. The original proposal is not very useful. $_GET contains parsed query string info, $_POST contains parsed H

Re: [PHP-DEV] Native support - PUT request, multipart form data

2014-08-18 Thread David Zuelke
On 17 Aug 2014, at 22:55, Chris Wright wrote: > On 17 August 2014 11:49, David Zuelke wrote: >> That does not make any sense; applications could accept XML, CSV or whatever >> else just as well. >> >> The original proposal is not very useful. $_GET contains parsed query string >> info, $_POST

Re: [PHP-DEV] Native support - PUT request, multipart form data

2014-08-17 Thread Park Framework
2014-08-17 23:55 GMT+03:00 Chris Wright : > Personally my ideal option would be to deprecate $_POST and $_GET in > favour of $_BODY and $_QUERY, respectively, which would be populated > the same way regardless of the request method (not just PUT and POST). > Similarly $_FILES would be populated for

Re: [PHP-DEV] Native support - PUT request, multipart form data

2014-08-17 Thread Chris Wright
On 17 August 2014 11:49, David Zuelke wrote: > That does not make any sense; applications could accept XML, CSV or whatever > else just as well. > > The original proposal is not very useful. $_GET contains parsed query string > info, $_POST contains parsed HTTP request body information if the me

Re: [PHP-DEV] Native support - PUT request, multipart form data

2014-08-17 Thread Park Framework
As a variant, not to create a new super global variables, can be modified $_REQUEST to OOP style class _REQUEST implements ArrayAccess // for backward compatibility { } // get as array, from body request $_REQUEST->body // get all http request headers $_REQUEST->headers // get method requ

Re: [PHP-DEV] Native support - PUT request, multipart form data

2014-08-17 Thread Park Framework
2014-08-17 12:22 GMT+03:00 Ferenc Kovacs : > > > > On Sun, Aug 17, 2014 at 12:41 AM, Park Framework > 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 vers

Re: [PHP-DEV] Native support - PUT request, multipart form data

2014-08-17 Thread Julien Pauli
On Sun, Aug 17, 2014 at 12:49 PM, David Zuelke wrote: > That does not make any sense; applications could accept XML, CSV or whatever > else just as well. > > The original proposal is not very useful. $_GET contains parsed query string > info, $_POST contains parsed HTTP request body information

Re: [PHP-DEV] Native support - PUT request, multipart form data

2014-08-17 Thread David Zuelke
That does not make any sense; applications could accept XML, CSV or whatever else just as well. The original proposal is not very useful. $_GET contains parsed query string info, $_POST contains parsed HTTP request body information if the media type is application/x-www-urlencoded or multipart/

Re: [PHP-DEV] Native support - PUT request, multipart form data

2014-08-17 Thread Ferenc Kovacs
On Sun, Aug 17, 2014 at 12:41 AM, Park Framework 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 > feel free to create an rfc/implementation, I don'

Re: [PHP-DEV] Native support - PUT request, multipart form data

2014-08-16 Thread Thomas Bley
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 $

Re: [PHP-DEV] Native support - PUT request, multipart form data

2014-08-16 Thread Thomas Bley
I think it would be great to have json encoded data from input body in $_REQUEST, just like parameters from the request-uri or form-urlencoded data. Regards, Thomas Park Framework wrote on 17.08.2014 02:33: > Maybe, select the best API can community. > The main thing that it was not a reason fo

Re: [PHP-DEV] Native support - PUT request, multipart form data

2014-08-16 Thread Park Framework
Maybe, select the best API can community. The main thing that it was not a reason for delaying. 2014-08-17 3:25 GMT+03:00 Andrea Faulds : > > On 17 Aug 2014, at 00:47, Park Framework wrote: > > > Variable $_PUT is already a popular name. > > $_POST isn’t really POST data nor is $_GET really GET

Re: [PHP-DEV] Native support - PUT request, multipart form data

2014-08-16 Thread Andrea Faulds
On 17 Aug 2014, at 00:47, Park Framework wrote: > Variable $_PUT is already a popular name. $_POST isn’t really POST data nor is $_GET really GET data. We shouldn’t continue this silly naming tradition given both existing names are inaccurate. We should have a query parameters array and a req

Re: [PHP-DEV] Native support - PUT request, multipart form data

2014-08-16 Thread Chris Wright
On 17 August 2014 00:47, Park Framework wrote: > 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. IMO $_BODY would ma

Re: [PHP-DEV] Native support - PUT request, multipart form data

2014-08-16 Thread Park Framework
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",

[PHP-DEV] Native support - PUT request, multipart form data

2014-08-16 Thread Park Framework
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