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