Closed bartvanhoutte closed 5 years ago
What is the best way to go from React\Stream\ReadableStreamInterface to Psr\Http\Message\StreamInterface\?
React\Stream\ReadableStreamInterface
Psr\Http\Message\StreamInterface\
I found https://github.com/WyriHaximus/reactphp-psr7-stream-converter, but it is archived.
Thanks for your help!
You can buffer the contents with and once you reached the end of it create the PSR-7 request/response: https://reactphp.org/promise-stream/#buffer
Thank you👌
What is the best way to go from
React\Stream\ReadableStreamInterface
toPsr\Http\Message\StreamInterface\
?I found https://github.com/WyriHaximus/reactphp-psr7-stream-converter, but it is archived.
Thanks for your help!