Examples miss a really important point: error handly for a request like a simple timeout.
simply like this:
$request = $client->request('GET', $url);
$request->on('error', function ($e) {
$socketerror = $e->getPrevious();
echo "request failed with error: " . $e->getMessage() . PHP_EOL;
});
I spend too much time just for this so i think it should be added in the README or the exemple section.
Examples miss a really important point: error handly for a request like a simple timeout.
simply like this:
I spend too much time just for this so i think it should be added in the README or the exemple section.