From 891f771ca9bb5356ca4aea8a4a84b69a77124fd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Michael=20O=2E=20Hegg=C3=B8?= Date: Sun, 31 Jan 2021 17:43:45 +0100 Subject: [PATCH] [http_client] Fix default headers --- http_client.rst | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/http_client.rst b/http_client.rst index 91122c00961..c7f31ec40f6 100644 --- a/http_client.rst +++ b/http_client.rst @@ -511,9 +511,10 @@ requests and the specific headers for each request: # config/packages/framework.yaml framework: - http_client: - headers: - 'User-Agent': 'My Fancy App' + default_options: + http_client: + headers: + 'User-Agent': 'My Fancy App' .. code-block:: xml @@ -528,7 +529,9 @@ requests and the specific headers for each request: - My Fancy App + + My Fancy App + @@ -538,8 +541,10 @@ requests and the specific headers for each request: // config/packages/framework.php $container->loadFromExtension('framework', [ 'http_client' => [ - 'headers' => [ - 'User-Agent' => 'My Fancy App', + 'default_options' => [ + 'headers' => [ + 'User-Agent' => 'My Fancy App', + ], ], ], ]);