Skip to content

Commit f479ce1

Browse files
authored
allow sub second timeout value for http requests (#53850)
1 parent 68d0db9 commit f479ce1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Illuminate/Http/Client/PendingRequest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -575,10 +575,10 @@ public function sink($to)
575575
/**
576576
* Specify the timeout (in seconds) for the request.
577577
*
578-
* @param int $seconds
578+
* @param int|float $seconds
579579
* @return $this
580580
*/
581-
public function timeout(int $seconds)
581+
public function timeout(int|float $seconds)
582582
{
583583
return tap($this, function () use ($seconds) {
584584
$this->options['timeout'] = $seconds;
@@ -588,10 +588,10 @@ public function timeout(int $seconds)
588588
/**
589589
* Specify the connect timeout (in seconds) for the request.
590590
*
591-
* @param int $seconds
591+
* @param int|float $seconds
592592
* @return $this
593593
*/
594-
public function connectTimeout(int $seconds)
594+
public function connectTimeout(int|float $seconds)
595595
{
596596
return tap($this, function () use ($seconds) {
597597
$this->options['connect_timeout'] = $seconds;

0 commit comments

Comments
 (0)