Skip to content
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

[11.x] allow sub second timeout value for http requests #53850

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
allow sub second timeout value for http requests
  • Loading branch information
mihaileu authored Dec 11, 2024
commit 8b26ba68192c60c3ab31487e43b0acd1d7ef59a4
8 changes: 4 additions & 4 deletions src/Illuminate/Http/Client/PendingRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -575,10 +575,10 @@ public function sink($to)
/**
* Specify the timeout (in seconds) for the request.
*
* @param int $seconds
* @param int|float $seconds
* @return $this
*/
public function timeout(int $seconds)
public function timeout(int|float $seconds)
{
return tap($this, function () use ($seconds) {
$this->options['timeout'] = $seconds;
Expand All @@ -588,10 +588,10 @@ public function timeout(int $seconds)
/**
* Specify the connect timeout (in seconds) for the request.
*
* @param int $seconds
* @param int|float $seconds
* @return $this
*/
public function connectTimeout(int $seconds)
public function connectTimeout(int|float $seconds)
{
return tap($this, function () use ($seconds) {
$this->options['connect_timeout'] = $seconds;
Expand Down
Loading