@@ -120,7 +120,7 @@ You can configure the global options using the ``default_options`` option:
120
120
<framework : config >
121
121
<framework : http-client >
122
122
<framework : default-options max-redirects =" 7" />
123
- </framework- http-client >
123
+ </framework : http-client >
124
124
</framework : config >
125
125
</container >
126
126
@@ -179,7 +179,7 @@ The HTTP client also has one configuration option called
179
179
<framework : config >
180
180
<framework : http-client max-host-connections =" 10" >
181
181
<!-- ... -->
182
- </framework- http-client >
182
+ </framework : http-client >
183
183
</framework : config >
184
184
</container >
185
185
@@ -502,17 +502,16 @@ associative array via the ``query`` option, that will be merged with the URL::
502
502
Headers
503
503
~~~~~~~
504
504
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:
507
506
508
507
.. configuration-block ::
509
508
510
509
.. code-block :: yaml
511
510
512
511
# config/packages/framework.yaml
513
512
framework :
514
- default_options :
515
- http_client :
513
+ http_client :
514
+ default_options :
516
515
headers :
517
516
' User-Agent ' : ' My Fancy App'
518
517
@@ -532,7 +531,7 @@ requests and the specific headers for each request:
532
531
<framework : default-options >
533
532
<framework : header name =" User-Agent" >My Fancy App</framework : header >
534
533
</framework : default-options >
535
- </framework- http-client >
534
+ </framework : http-client >
536
535
</framework : config >
537
536
</container >
538
537
@@ -558,6 +557,8 @@ requests and the specific headers for each request:
558
557
],
559
558
]);
560
559
560
+ You can also set new headers or override the default ones for specific requests:
561
+
561
562
.. code-block :: php
562
563
563
564
// this header is only included in this request and overrides the value
@@ -772,7 +773,7 @@ the ``http_version`` option:
772
773
<framework : config >
773
774
<framework : http-client >
774
775
<framework : default-options http-version =" 2.0" />
775
- </framework- http-client >
776
+ </framework : http-client >
776
777
</framework : config >
777
778
</container >
778
779
0 commit comments