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.
2 parents e49377f + 2a86103 commit 1c5e7adCopy full SHA for 1c5e7ad
http_client.rst
@@ -144,6 +144,16 @@ method to retrieve a new instance of the client with new default options::
144
'extra' => ['my-key' => 'my-value'],
145
]);
146
147
+Alternatively, the :class:`Symfony\\Component\\HttpClient\\HttpOptions` class brings most of the available options with
148
+type-hinted getters and setters::
149
+
150
+ $this->client = $client->withOptions(
151
+ (new HttpOptions())
152
+ ->setBaseUri('https://...')
153
+ ->setHeaders(['header-name' => 'header-value'])
154
+ ->toArray()
155
+ );
156
157
Some options are described in this guide:
158
159
* `Authentication`_
0 commit comments