Skip to content

Commit

Permalink
allow sub second timeout value for http requests (#53850)
Browse files Browse the repository at this point in the history
  • Loading branch information
mihaileu authored Dec 11, 2024
1 parent 68d0db9 commit f479ce1
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit f479ce1

Please sign in to comment.