Skip to content

Commit bc5a233

Browse files
Mathieu LechatOskarStark
Mathieu Lechat
authored andcommitted
[HttpClient] Mention extra.trace_content option
1 parent c7444dd commit bc5a233

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

http_client.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -814,6 +814,25 @@ ensure local networks are made inaccessible to the HTTP client::
814814
// but all the other requests, including other internal networks, will be allowed
815815
$client = new NoPrivateNetworkHttpClient(HttpClient::create(), ['104.26.14.0/23']);
816816

817+
Profiling
818+
~~~~~~~~~
819+
820+
When you are using the :class:`Symfony\\Component\\HttpClient\\TraceableHttpClient`,
821+
responses content will be kept in memory and may exhaust it.
822+
823+
You can disable this behavior by setting the ``extra.trace_content`` option to ``false``
824+
in your requests::
825+
826+
$response = $client->request('GET', 'https://...', [
827+
'extra' => ['trace_content' => false],
828+
]);
829+
830+
This setting won’t affect other clients.
831+
832+
.. versionadded:: 5.2
833+
834+
The ``extra.trace_content`` option was introduced in Symfony 5.2.
835+
817836
Performance
818837
-----------
819838

0 commit comments

Comments
 (0)