File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -803,12 +803,20 @@ outgoing network interface.
803803buffer
804804......
805805
806- **type **: ``bool `` | ``string ``
806+ **type **: ``bool `` | ``Closure ``
807807
808- Option that allows to buffer the content of the response and access it multiple times without performing the request again.
809- If boolean value given, request will be buffered or not according to the boolean value. If a string is given, this should
810- be a regex matching the response content-types that
811- should be buffered
808+ Buffering the response means that you can access its content multiple times
809+ without performing the request again. Buffering is enabled by default when the
810+ content type of the response is ``text/* ``, ``application/json `` or ``application/xml ``.
811+
812+ If this option is a boolean value, the response is buffered when the value is
813+ ``true ``. If this option is a closure, the response is buffered when the
814+ returned value is ``true `` (the closure receives as argument an array with the
815+ response headers).
816+
817+ .. versionadded :: 4.4
818+
819+ The support of ``Closure `` in the ``buffer `` option was introduced in Symfony 4.4.
812820
813821cafile
814822......
You can’t perform that action at this time.
0 commit comments