Re: RFC: Server-Side Request and Response Objects (v2)
| From: | Paul M. Jones | Date: | Wed, 12 Feb 2020 22:46:22 +0000 |
| Subject: | Re: RFC: Server-Side Request and Response Objects (v2) | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-108524@lists.php.net to get a copy of this message | ||
Hi Allen & Robin,
Allen, you asked:
> On Feb 12, 2020, at 15:27, AllenJB <php.lists@allenjb.me.uk> wrote:
>
> This might be more a "future scope" thing, but I would like to see a way to access
> the raw request body as part of this. Currently (as far as I know) the only way is to open/read
> php://input, which isn't particularly intuitive in my opinion.
Robin asked the same thing earlier:
> On Feb 11, 2020, at 08:24, Kingsquare.nl - Robin Speekenbrink <robin@kingsquare.nl>
> wrote:
>
> What i haven't clearly seen in the RFC nor the interfaces of the proposed objects: how
> will this handle PUT / php:://input / raw posted data? Or am i missing something?
Answer: the php://input stream is accessible via the ServerRequest $content property; see <https://github.com/pmjones/ext-request#content-related>.
--
Paul M. Jones
pmjones@pmjones.io
http://paul-m-jones.com
Modernizing Legacy Applications in PHP
https://leanpub.com/mlaphp
Solving the N+1 Problem in PHP
https://leanpub.com/sn1php