timeout

Summary

Float describing the timeout of the request in seconds. Use 0 to wait indefinitely (the default behavior).

Types

float

Default

0

Constant

GuzzleHttp\RequestOptions::TIMEOUT

  1. // Timeout if a server does not return a response in 3.14 seconds.
  2. $client->request('GET', '/delay/5', ['timeout' => 3.14]);
  3. // PHP Fatal error: Uncaught exception 'GuzzleHttp\Exception\RequestException'