File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -138,6 +138,18 @@ You can configure the global options using the ``default_options`` option:
138138 'max_redirects' => 7,
139139 ]);
140140
141+ You can also use the :method: `Symfony\\ Contracts\\ HttpClient\\ HttpClientInterface::withOptions `
142+ method to retrieve a new instance of the client with new default options::
143+
144+ $this->client = $client->withOptions([
145+ 'base_uri' => 'https://...',
146+ 'headers' => ['header-name' => 'header-value']
147+ ]);
148+
149+ .. versionadded :: 5.3
150+
151+ The ``withOptions() `` method was introduced in Symfony 5.3.
152+
141153Some options are described in this guide:
142154
143155* `Authentication `_
Original file line number Diff line number Diff line change @@ -497,7 +497,7 @@ the MongoDB connection as argument:
497497 // config/services.php
498498 namespace Symfony\Component\DependencyInjection\Loader\Configurator;
499499
500- use Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler ;
500+ use Symfony\Component\HttpFoundation\Session\Storage\Handler\MongoDbSessionHandler ;
501501
502502 return static function (ContainerConfigurator $container) {
503503 $services = $configurator->services();
@@ -606,7 +606,7 @@ configure these values with the second argument passed to the
606606 // config/services.php
607607 namespace Symfony\Component\DependencyInjection\Loader\Configurator;
608608
609- use Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler ;
609+ use Symfony\Component\HttpFoundation\Session\Storage\Handler\MongoDbSessionHandler ;
610610
611611 return static function (ContainerConfigurator $container) {
612612 $services = $configurator->services();
You can’t perform that action at this time.
0 commit comments