feat: catch any response
This commit is contained in:
parent
5959e80efb
commit
6be49c6742
@ -131,6 +131,8 @@ function fetch(Psr\Http\Message\ServerRequestInterface $req) {
|
|||||||
$url = substr($url, 1);
|
$url = substr($url, 1);
|
||||||
|
|
||||||
$client = new React\Http\Browser($loop);
|
$client = new React\Http\Browser($loop);
|
||||||
|
// catch any response
|
||||||
|
$client = $client->withRejectErrorResponse(false);
|
||||||
|
|
||||||
// see https://github.com/reactphp/http#streaming-response
|
// see https://github.com/reactphp/http#streaming-response
|
||||||
return $client->requestStreaming($req->getMethod(), $url)->then(function (Psr\Http\Message\ResponseInterface $response) {
|
return $client->requestStreaming($req->getMethod(), $url)->then(function (Psr\Http\Message\ResponseInterface $response) {
|
||||||
|
Loading…
Reference in New Issue
Block a user