Skip to content

[9.x] add Http::connectTimeout to set connect_timeout option #40466

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 18, 2022

Conversation

chu121su12
Copy link
Contributor

Closes #40465

This PR #40187 introduces breaking change to Http call:

Http::withOptions([
  'timeout' => 1,
  'connect_timeout' => 1,
])->get('http://laravel.com')

There's standalone timeout method to set timeout, but currently there's no way to set connect_timeout outside of withOptions. This is due to withOptions is doing array_merge_recursive causing existing options to be arrayed and when the options get to guzzle, it cannot handle array * int.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants