Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb30765 commit dbc790bCopy full SHA for dbc790b
http_client.rst
@@ -149,6 +149,16 @@ method to retrieve a new instance of the client with new default options::
149
150
The ``withOptions()`` method was introduced in Symfony 5.3.
151
152
+Alternatively, the :class:`Symfony\\Component\\HttpClient\\HttpOptions` class brings most of the available options with
153
+type-hinted getters and setters::
154
+
155
+ $this->client = $client->withOptions(
156
+ (new HttpOptions())
157
+ ->setBaseUri('https://...')
158
+ ->setHeaders(['header-name' => 'header-value'])
159
+ ->toArray()
160
+ );
161
162
Some options are described in this guide:
163
164
* `Authentication`_
0 commit comments