File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -1043,6 +1043,10 @@ following methods::
10431043 // returns detailed logs about the requests and responses of the HTTP transaction
10441044 $httpLogs = $response->getInfo('debug');
10451045
1046+ // the special "pause_handler" info item is a callable that allows to delay the request
1047+ // this helps implement delayed retries or throttling streams for example
1048+ $response->getInfo('pause_handler')(2);
1049+
10461050.. note ::
10471051
10481052 ``$response->toStream() `` is part of :class: `Symfony\\ Component\\ HttpClient\\ Response\\ StreamableInterface `.
@@ -1053,6 +1057,10 @@ following methods::
10531057 about the response. Some of them might not be known yet (e.g. ``http_code ``)
10541058 when you'll call it.
10551059
1060+ .. versionadded :: 5.2
1061+
1062+ The ``pause_handler `` info item was introduced in Symfony 5.2.
1063+
10561064.. _http-client-streaming-responses :
10571065
10581066Streaming Responses
You can’t perform that action at this time.
0 commit comments