File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -143,7 +143,8 @@ method to retrieve a new instance of the client with new default options::
143
143
144
144
$this->client = $client->withOptions([
145
145
'base_uri' => 'https://...',
146
- 'headers' => ['header-name' => 'header-value']
146
+ 'headers' => ['header-name' => 'header-value'],
147
+ 'extra' => ['my-key' => 'my-value'],
147
148
]);
148
149
149
150
Some options are described in this guide:
Original file line number Diff line number Diff line change @@ -1031,6 +1031,18 @@ enabled
1031
1031
Whether to enable the support for retry failed HTTP request or not.
1032
1032
This setting is automatically set to true when one of the child settings is configured.
1033
1033
1034
+ extra
1035
+ .....
1036
+
1037
+ **type **: ``array ``
1038
+
1039
+ Arbitrary additional data to pass to the HTTP client for further use.
1040
+ This can be particularly useful when :ref: `decorating an existing client <extensibility >`.
1041
+
1042
+ .. versionadded :: 6.3
1043
+
1044
+ The ``extra `` option has been introduced in Symfony 6.3.
1045
+
1034
1046
.. _http-headers :
1035
1047
1036
1048
headers
You can’t perform that action at this time.
0 commit comments