mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-24 21:59:55 +09:00
Update composer dependencies
This commit is contained in:
parent
49cc39e507
commit
cbd324c35b
428 changed files with 17862 additions and 5885 deletions
17
vendor/rmccue/requests/examples/timeout.php
vendored
Normal file
17
vendor/rmccue/requests/examples/timeout.php
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
// First, include Requests
|
||||
include('../library/Requests.php');
|
||||
|
||||
// Next, make sure Requests can load internal classes
|
||||
Requests::register_autoloader();
|
||||
|
||||
// Define a timeout of 2.5 seconds
|
||||
$options = array(
|
||||
'timeout' => 2.5,
|
||||
);
|
||||
|
||||
// Now let's make a request to a page that will delay its response by 3 seconds
|
||||
$request = Requests::get('http://httpbin.org/delay/3', array(), $options);
|
||||
|
||||
// An exception will be thrown, stating a timeout of the request !
|
||||
Loading…
Add table
Add a link
Reference in a new issue