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::
1043
1043
// returns detailed logs about the requests and responses of the HTTP transaction
1044
1044
$httpLogs = $response->getInfo('debug');
1045
1045
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
+
1046
1050
.. note ::
1047
1051
1048
1052
``$response->toStream() `` is part of :class: `Symfony\\ Component\\ HttpClient\\ Response\\ StreamableInterface `.
@@ -1053,6 +1057,10 @@ following methods::
1053
1057
about the response. Some of them might not be known yet (e.g. ``http_code ``)
1054
1058
when you'll call it.
1055
1059
1060
+ .. versionadded :: 5.2
1061
+
1062
+ The ``pause_handler `` info item was introduced in Symfony 5.2.
1063
+
1056
1064
.. _http-client-streaming-responses :
1057
1065
1058
1066
Streaming Responses
You can’t perform that action at this time.
0 commit comments