You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For convenience, you may use the `acceptJson` method to quickly specify that your application expects the `application/json` content type in response to your request:
@@ -385,9 +385,9 @@ Or, you may use the `assertNothingSent` method to assert that no requests were s
385
385
<aname="events"></a>
386
386
## Events
387
387
388
-
Laravel fires two events during the process of sending HTTP requests. The `RequestSending` event is fired prior to a request being sent, while the `ResponseReceived` event is fired after a response is received for a given request.
388
+
Laravel fires three events during the process of sending HTTP requests. The `RequestSending` event is fired prior to a request being sent, while the `ResponseReceived` event is fired after a response is received for a given request. The `ConnectionFailed` event is fired if no response is received for a given request.
389
389
390
-
The `RequestSending`event contains a public `$request` property that you may use to inspect the `Illuminate\Http\Client\Request` instance. Likewise, the `ResponseReceived` event contains a `$request` property as well as a `$response` property which may be used to inspect the `Illuminate\Http\Client\Response` instance. You may register event listeners for this event in your `App\Providers\EventServiceProvider` service provider:
390
+
The `RequestSending`and `ConnectionFailed` events both contain a public `$request` property that you may use to inspect the `Illuminate\Http\Client\Request` instance. Likewise, the `ResponseReceived` event contains a `$request` property as well as a `$response` property which may be used to inspect the `Illuminate\Http\Client\Response` instance. You may register event listeners for this event in your `App\Providers\EventServiceProvider` service provider:
391
391
392
392
/**
393
393
* The event listener mappings for the application.
@@ -401,4 +401,7 @@ The `RequestSending` event contains a public `$request` property that you may us
0 commit comments