Re: Re: Parsing PUT data
| From: | Peter Lind | Date: | Tue, 24 Sep 2013 15:13:26 +0000 |
| Subject: | Re: Re: Parsing PUT data | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-69319@lists.php.net to get a copy of this message | ||
On 24 September 2013 16:59, Daniel Lowrey <rdlowrey@gmail.com> wrote:
> The bigger issue here is that the superglobals are a leaky abstraction. Any
> HTTP request method is allowed to have an entity body, so should we also
> create $_PATCH and $_PUT and $_ZANZIBAR to handle less-frequently used
> request methods? Where does it stop? This is the problem I see with all the
> requests to support for PUT similarly to POST. PHP web SAPIs support 95% of
> the HTTP use-cases people have, but the abstractions break down after that
> and continuously bolting on support for individual scenarios beyond that
> would be a mistake IMO.
>
Supporting the base set would not seem a bad idea, I'd say -
http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9
PUT is not exactly exotic, though it might not be as used as it could be -
however, with the focus on REST APIs that is changing. Your argument makes
good sense for random HTTP verbs - but suggesting we shouldn't support easy
access to the basic set because "where does it stop" is not a very good
argument, in my eyes.
Regards
Peter
<http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9>--
<hype>
WWW: plphp.dk / plind.dk
CV: careers.stackoverflow.com/peterlind
LinkedIn: plind
Twitter: kafe15
</hype>