Skip to content
Open
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
15 changes: 15 additions & 0 deletions docs/usage-advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,21 @@ bugs in PHP for more information on Subject Alternate Name field.
[php-bug-47030]: https://php.net/47030
[php-bug-55820]: https://php.net/55820


Set a Timeout for Requests
--------------------------
Set a response timeout for Requests:

```php
$options = array(
'connect_timeout' => 60, // How long should we wait while trying to connect?
'timeout' => 60 // How long should we wait for a response?
);
$response = Requests::get('https://httpbin.org/', array(), $options);
```



***

Previous: [Making a request](usage.md)
Expand Down