File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -734,12 +734,13 @@ each retry.
734
734
Retry over different uris
735
735
.........................
736
736
737
+ .. versionadded :: 6.3
738
+ The multiple ``base_uri `` feature was added in Symfony 6.3.
739
+
737
740
The ``RetryableHttpClient `` can be configured to use multiple base URIs. This
738
741
feature provides increased flexibility and reliability for making HTTP
739
742
requests. Pass an array of base URIs as option ``base_uri `` when making a
740
- request:
741
-
742
- .. code-block :: php
743
+ request::
743
744
744
745
$response = $client->request('GET', 'foo-bar', [
745
746
'base_uri' => [
@@ -754,9 +755,7 @@ When the number of retries is higher than the number of base URIs, the
754
755
last base URI will be used for remaining retries.
755
756
756
757
If you want to shuffle the order of base URIs for each retry attempt, nest the
757
- base URIs you want to shuffle in an additional array:
758
-
759
- .. code-block :: php
758
+ base URIs you want to shuffle in an additional array::
760
759
761
760
$response = $client->request('GET', 'foo-bar', [
762
761
'base_uri' => [
@@ -778,9 +777,7 @@ By using a nested array for the base URI, you can use this feature
778
777
to distribute the load among many nodes in a cluster of servers.
779
778
780
779
You can also configure the array of base URIs using the ``withOptions() ``
781
- method:
782
-
783
- .. code-block :: php
780
+ method::
784
781
785
782
$client = $client->withOptions(['base_uri' => [
786
783
'http://example.com/a/',
You can’t perform that action at this time.
0 commit comments