Description
PHP version: any
Description
In the client, we are using the ->request()
method on the ReactPHP\Http\Browser
object. This method will not use the streaming capabilities by default and it seems that all the request content will be stored in memory.
It seems to be a normal behavior on the ReactPHP side but I'm not sure it's a correct behavior here.
How to reproduce
Try to download a big file using a simple HTTP request. I made a sample repository to reproduce the issue, you can find it here : https://github.com/shulard/reactphp-adapter-issue-with-streaming
Possible Solution
In the reactphp/http Readme, there are some details about streaming responses: https://github.com/reactphp/http#streaming-response
I tried to work with those streams but couldn't find a way to retrieve the content. I think that we might change the Promise
implementation to handle the stream.