Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #50240 [HttpClient] Add
max_retries
option to `RetryableHtt…
…pClient` (danielburger1337) This PR was squashed before being merged into the 6.4 branch. Discussion ---------- [HttpClient] Add `max_retries` option to `RetryableHttpClient` | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | N/A | License | MIT | Doc PR | symfony/symfony-docs#18288 Added a `max_retries` option to RetryableHttpClient that allows the user to configure the RetryableHttpClient on a per request level, which is especially useful when `retry_failed` was configured for the global `http_client` service. ```php <?php use Symfony\Component\HttpClient\HttpClient; use Symfony\Component\HttpClient\RetryableHttpClient; $client = HttpClient::create(); $client = new RetryableHttpClient($client, null, 3); $client->request('GET', '/foo-bar', [ 'max_retries' => 1 // 0 disables retrying ]); // $client = $client->withOptions(['max_retries' => 1]); ``` Commits ------- 496ba59 [HttpClient] Add `max_retries` option to `RetryableHttpClient`
- Loading branch information
Showing
3 changed files
with
55 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters