Skip to content

Commit 9a8101f

Browse files
committed
Tweaks
1 parent c95633e commit 9a8101f

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

http_client.rst

+9-8
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ You can configure the global options using the ``default_options`` option:
120120
<framework:config>
121121
<framework:http-client>
122122
<framework:default-options max-redirects="7"/>
123-
</framework-http-client>
123+
</framework:http-client>
124124
</framework:config>
125125
</container>
126126
@@ -179,7 +179,7 @@ The HTTP client also has one configuration option called
179179
<framework:config>
180180
<framework:http-client max-host-connections="10">
181181
<!-- ... -->
182-
</framework-http-client>
182+
</framework:http-client>
183183
</framework:config>
184184
</container>
185185
@@ -502,17 +502,16 @@ associative array via the ``query`` option, that will be merged with the URL::
502502
Headers
503503
~~~~~~~
504504

505-
Use the ``headers`` option to define both the default headers added to all
506-
requests and the specific headers for each request:
505+
Use the ``headers`` option to define the default headers added to all requests:
507506

508507
.. configuration-block::
509508

510509
.. code-block:: yaml
511510
512511
# config/packages/framework.yaml
513512
framework:
514-
default_options:
515-
http_client:
513+
http_client:
514+
default_options:
516515
headers:
517516
'User-Agent': 'My Fancy App'
518517
@@ -532,7 +531,7 @@ requests and the specific headers for each request:
532531
<framework:default-options>
533532
<framework:header name="User-Agent">My Fancy App</framework:header>
534533
</framework:default-options>
535-
</framework-http-client>
534+
</framework:http-client>
536535
</framework:config>
537536
</container>
538537
@@ -558,6 +557,8 @@ requests and the specific headers for each request:
558557
],
559558
]);
560559
560+
You can also set new headers or override the default ones for specific requests:
561+
561562
.. code-block:: php
562563
563564
// this header is only included in this request and overrides the value
@@ -772,7 +773,7 @@ the ``http_version`` option:
772773
<framework:config>
773774
<framework:http-client>
774775
<framework:default-options http-version="2.0"/>
775-
</framework-http-client>
776+
</framework:http-client>
776777
</framework:config>
777778
</container>
778779

0 commit comments

Comments
 (0)