File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -1783,6 +1783,28 @@ You can also pass a set of default options to your client thanks to the
17831783
17841784 // ...
17851785
1786+ .. _auto-upgrade-http-version :
1787+
1788+ You can use the ``auto_upgrade_http_version `` option to control whether the HTTP
1789+ protocol version is automatically upgraded::
1790+
1791+ $client = (new Psr18Client())
1792+ ->withOptions([
1793+ // set to false to always use the HTTP version defined in your request;
1794+ // set to true to allow the server to upgrade the HTTP version in its response
1795+ 'auto_upgrade_http_version' => false
1796+ // ...
1797+ ]);
1798+
1799+ .. note ::
1800+
1801+ The ``auto_upgrade_http_version `` option is ignored for HTTP/1.0 requests,
1802+ which always keep that protocol version.
1803+
1804+ .. versionadded :: 7.4
1805+
1806+ The ``auto_upgrade_http_version `` option was introduced in Symfony 7.4.
1807+
17861808HTTPlug
17871809~~~~~~~
17881810
@@ -1884,6 +1906,10 @@ You can also pass a set of default options to your client thanks to the
18841906
18851907 // ...
18861908
1909+
1910+ See the :ref: `auto_upgrade_http_version <auto-upgrade-http-version >` option for
1911+ details about how the HTTP protocol version selection works.
1912+
18871913Native PHP Streams
18881914~~~~~~~~~~~~~~~~~~
18891915
You can’t perform that action at this time.
0 commit comments