-
-
Notifications
You must be signed in to change notification settings - Fork 61
Closed
Labels
Milestone
Description
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.