File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 1414
1515- ``SecurityHeadersMiddleware::setPermissionsPolicy() `` was added. This method
1616 adds the ability to define ``permissions-policy `` header values.
17+ - ``Client `` now emits ``HttpClient.beforeSend `` and ``HttpClient.afterSend ``
18+ events when requests are sent. You can use these events to perform logging,
19+ caching or collect telemetry.
1720
1821Validation
1922----------
Original file line number Diff line number Diff line change @@ -358,6 +358,17 @@ method::
358358 ]);
359359 $http->addCookie(new Cookie('session', 'abc123'));
360360
361+ Client Events
362+ =============
363+
364+ ``Client `` will emit events when requests are sent. The
365+ ``HttpClient.beforeSend `` event is fired before a request is sent, and
366+ ``HttpClient.afterSend `` is fired after a request is sent. You can modify the
367+ request, or set a response in a ``beforeSend `` listener. The ``afterSend `` event
368+ is triggered for all requests, even those that have their responses set by
369+ a ``beforeSend `` event.
370+
371+
361372.. _httpclient-response-objects :
362373
363374Response Objects
You can’t perform that action at this time.
0 commit comments