You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
minor symfony#49791 [HttpClient] Add hint about timeout and max_duration options (Kocal)
This PR was merged into the 5.4 branch.
Discussion
----------
[HttpClient] Add hint about `timeout` and `max_duration` options
| Q | A
| ------------- | ---
| Branch? | 5.4
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | yes/no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
When reading the PHPDoc or the documentation (https://symfony.com/doc/current/http_client.html#dealing-with-network-timeouts), we don't know if we must pass seconds or milliseconds.
I believe `max_duration` is waiting for seconds, given the code from the `CurlHttpClient`:
<img width="912" alt="image" src="https://user-images.githubusercontent.com/2103975/226627443-10dada66-4e55-4aff-9d33-de30c733b3f3.png">
Added hint for `timeout` option too.
Commits
-------
eb4b511 [HttpClient] Add hint about `timeout` and `max_duration` options
0 commit comments