HTTP supergloblas and request body/query (was: Parsing PUT data)
| From: | Michael Wallner | Date: | Wed, 02 Oct 2013 06:59:15 +0000 |
| Subject: | HTTP supergloblas and request body/query (was: Parsing PUT data) | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-69436@lists.php.net to get a copy of this message | ||
Since ever people are confused by _GET and _POST superglobals,
because, despite their name, they do not (really) depend on the
request method. Therefor I propose to phase out $_GET and name it
$_QUERY and I propose to phase out $_POST and name it $_FORM (I'm not
100% confident with the latter yet, though).
Further, I propose to remove the POST method restriction for handling
request bodies and solely rely on the content type to trigger the
parser(s). (*)
There are already parsers for application/x-www-form-urlencoded and
multipart/form-data in the core. One could think of providing an API
to add content type handlers from extensions, ext/json may be an
example, like it is hacked into pecl_http-v2.
Thoughts, objections, insults?
(*) We'd probably have to revisit all *post* INI variables, though.
--
Regards,
Mike