Skip to content

Commit ae2a3b7

Browse files
committed
Merge branch '4.4'
* 4.4: Add buffer configuration option to http_client
2 parents a8d64cc + 178c5d7 commit ae2a3b7

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

reference/configuration/framework.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ Configuration
9393
* :ref:`default_options <reference-http-client-default-options>`
9494

9595
* `bindto`_
96+
* `buffer`_
9697
* `cafile`_
9798
* `capath`_
9899
* `ciphers`_
@@ -120,6 +121,7 @@ Configuration
120121
* `auth_ntlm`_
121122
* `base_uri`_
122123
* `bindto`_
124+
* `buffer`_
123125
* `cafile`_
124126
* `capath`_
125127
* `ciphers`_
@@ -773,6 +775,24 @@ bindto
773775
A network interface name, IP address, a host name or a UNIX socket to use as the
774776
outgoing network interface.
775777

778+
buffer
779+
......
780+
781+
**type**: ``bool`` | ``Closure``
782+
783+
Buffering the response means that you can access its content multiple times
784+
without performing the request again. Buffering is enabled by default when the
785+
content type of the response is ``text/*``, ``application/json`` or ``application/xml``.
786+
787+
If this option is a boolean value, the response is buffered when the value is
788+
``true``. If this option is a closure, the response is buffered when the
789+
returned value is ``true`` (the closure receives as argument an array with the
790+
response headers).
791+
792+
.. versionadded:: 4.4
793+
794+
The support of ``Closure`` in the ``buffer`` option was introduced in Symfony 4.4.
795+
776796
cafile
777797
......
778798

0 commit comments

Comments
 (0)