@@ -1024,25 +1024,6 @@ The minimum version of TLS to accept. The value must be one of the
1024
1024
1025
1025
The ``crypto_method `` option was introduced in Symfony 6.3.
1026
1026
1027
- .. _reference-http-client-retry-delay :
1028
-
1029
- delay
1030
- .....
1031
-
1032
- **type **: ``integer `` **default **: ``1000 ``
1033
-
1034
- The initial delay in milliseconds used to compute the waiting time between retries.
1035
-
1036
- .. _reference-http-client-retry-enabled :
1037
-
1038
- enabled
1039
- .......
1040
-
1041
- **type **: ``boolean `` **default **: ``false ``
1042
-
1043
- Whether to enable the support for retry failed HTTP request or not.
1044
- This setting is automatically set to true when one of the child settings is configured.
1045
-
1046
1027
extra
1047
1028
.....
1048
1029
@@ -1065,15 +1046,6 @@ headers
1065
1046
An associative array of the HTTP headers added before making the request. This
1066
1047
value must use the format ``['header-name' => 'value0, value1, ...'] ``.
1067
1048
1068
- .. _reference-http-client-retry-http-codes :
1069
-
1070
- http_codes
1071
- ..........
1072
-
1073
- **type **: ``array `` **default **: :method: `Symfony\\ Component\\ HttpClient\\ Retry\\ GenericRetryStrategy::DEFAULT_RETRY_STATUS_CODES `
1074
-
1075
- The list of HTTP status codes that triggers a retry of the request.
1076
-
1077
1049
http_version
1078
1050
............
1079
1051
@@ -1082,18 +1054,6 @@ http_version
1082
1054
The HTTP version to use, typically ``'1.1' `` or ``'2.0' ``. Leave it to ``null ``
1083
1055
to let Symfony select the best version automatically.
1084
1056
1085
- .. _reference-http-client-retry-jitter :
1086
-
1087
- jitter
1088
- ......
1089
-
1090
- **type **: ``float `` **default **: ``0.1 `` (must be between 0.0 and 1.0)
1091
-
1092
- This option adds some randomness to the delay. It's useful to avoid sending
1093
- multiple requests to the server at the exact same time. The randomness is
1094
- calculated as ``delay * jitter ``. For example: if delay is ``1000ms `` and jitter
1095
- is ``0.2 ``, the actual delay will be a number between ``800 `` and ``1200 `` (1000 +/- 20%).
1096
-
1097
1057
local_cert
1098
1058
..........
1099
1059
@@ -1111,16 +1071,6 @@ local_pk
1111
1071
The path of a file that contains the `PEM formatted `_ private key of the
1112
1072
certificate defined in the ``local_cert `` option.
1113
1073
1114
- .. _reference-http-client-retry-max-delay :
1115
-
1116
- max_delay
1117
- .........
1118
-
1119
- **type **: ``integer `` **default **: ``0 ``
1120
-
1121
- The maximum amount of milliseconds initial to wait between retries.
1122
- Use ``0 `` to not limit the duration.
1123
-
1124
1074
max_duration
1125
1075
............
1126
1076
@@ -1149,26 +1099,6 @@ max_redirects
1149
1099
The maximum number of redirects to follow. Use ``0 `` to not follow any
1150
1100
redirection.
1151
1101
1152
- .. _reference-http-client-retry-max-retries :
1153
-
1154
- max_retries
1155
- ...........
1156
-
1157
- **type **: ``integer `` **default **: ``3 ``
1158
-
1159
- The maximum number of retries for failing requests. When the maximum is reached,
1160
- the client returns the last received response.
1161
-
1162
- .. _reference-http-client-retry-multiplier :
1163
-
1164
- multiplier
1165
- ..........
1166
-
1167
- **type **: ``float `` **default **: ``2 ``
1168
-
1169
- This value is multiplied to the delay each time a retry occurs, to distribute
1170
- retries in time instead of making all of them sequentially.
1171
-
1172
1102
no_proxy
1173
1103
........
1174
1104
@@ -1239,6 +1169,7 @@ This option configures the behavior of the HTTP client when some request fails,
1239
1169
including which types of requests to retry and how many times. The behavior is
1240
1170
defined with the following options:
1241
1171
1172
+ * :ref: `retry_strategy <reference-http-client-retry-retry-strategy >`
1242
1173
* :ref: `delay <reference-http-client-retry-delay >`
1243
1174
* :ref: `http_codes <reference-http-client-retry-http-codes >`
1244
1175
* :ref: `jitter <reference-http-client-retry-jitter >`
@@ -1272,8 +1203,20 @@ defined with the following options:
1272
1203
retry_failed :
1273
1204
max_retries : 4
1274
1205
1206
+ .. _reference-http-client-retry-enabled :
1207
+
1208
+ enabled
1209
+ """""""
1210
+
1211
+ **type **: ``boolean `` **default **: ``false ``
1212
+
1213
+ Whether to enable the support for retry failed HTTP request or not.
1214
+ This setting is automatically set to true when one of the child settings is configured.
1215
+
1216
+ .. _reference-http-client-retry-retry-strategy :
1217
+
1275
1218
retry_strategy
1276
- ..............
1219
+ """"""""""""""
1277
1220
1278
1221
**type **: ``string ``
1279
1222
@@ -1284,6 +1227,66 @@ with ``http_codes``, ``delay``, ``max_delay``, ``multiplier`` and ``jitter``
1284
1227
options. This class has to implement
1285
1228
:class: `Symfony\\ Component\\ HttpClient\\ Retry\\ RetryStrategyInterface `.
1286
1229
1230
+ .. _reference-http-client-retry-http-codes :
1231
+
1232
+ http_codes
1233
+ """"""""""
1234
+
1235
+ **type **: ``array `` **default **: :method: `Symfony\\ Component\\ HttpClient\\ Retry\\ GenericRetryStrategy::DEFAULT_RETRY_STATUS_CODES `
1236
+
1237
+ The list of HTTP status codes that triggers a retry of the request.
1238
+
1239
+ .. _reference-http-client-retry-delay :
1240
+
1241
+ delay
1242
+ """""
1243
+
1244
+ **type **: ``integer `` **default **: ``1000 ``
1245
+
1246
+ The initial delay in milliseconds used to compute the waiting time between retries.
1247
+
1248
+ .. _reference-http-client-retry-jitter :
1249
+
1250
+ jitter
1251
+ """"""
1252
+
1253
+ **type **: ``float `` **default **: ``0.1 `` (must be between 0.0 and 1.0)
1254
+
1255
+ This option adds some randomness to the delay. It's useful to avoid sending
1256
+ multiple requests to the server at the exact same time. The randomness is
1257
+ calculated as ``delay * jitter ``. For example: if delay is ``1000ms `` and jitter
1258
+ is ``0.2 ``, the actual delay will be a number between ``800 `` and ``1200 `` (1000 +/- 20%).
1259
+
1260
+ .. _reference-http-client-retry-max-delay :
1261
+
1262
+ max_delay
1263
+ """""""""
1264
+
1265
+ **type **: ``integer `` **default **: ``0 ``
1266
+
1267
+ The maximum amount of milliseconds initial to wait between retries.
1268
+ Use ``0 `` to not limit the duration.
1269
+
1270
+ .. _reference-http-client-retry-max-retries :
1271
+
1272
+ max_retries
1273
+ """""""""""
1274
+
1275
+ **type **: ``integer `` **default **: ``3 ``
1276
+
1277
+ The maximum number of retries for failing requests. When the maximum is reached,
1278
+ the client returns the last received response.
1279
+
1280
+ .. _reference-http-client-retry-multiplier :
1281
+
1282
+ multiplier
1283
+ """""""""
1284
+
1285
+ **type **: ``float `` **default **: ``2 ``
1286
+
1287
+ This value is multiplied to the delay each time a retry occurs, to distribute
1288
+ retries in time instead of making all of them sequentially.
1289
+
1287
1290
scope
1288
1291
.....
1289
1292
0 commit comments