hi, problem with getting response back
SerjoA opened this issue · comments
SerjoA commented
$request->on('response', function (Response $response) use ($request) {
$response->on('data', function ($chunk) use ($request) {
$request->end();
$request->close();
dd( $chunk);
});
why only dd($chunk) will give me result, if i do return $chunk it wont give me anything
Christian Lück commented
Hi @SerjoA and welcome to React :-)
It's a bit unclear what you're trying to achieve from the snippet you've posted.
It looks like you may want to look at the http-client examples here: https://github.com/reactphp/http-client/tree/master/examples
I hope this helps 👍