mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-28 23:59:57 +09:00
Update composer dependencies
This commit is contained in:
parent
49cc39e507
commit
cbd324c35b
428 changed files with 17862 additions and 5885 deletions
20
vendor/rmccue/requests/examples/cookie_jar.php
vendored
Normal file
20
vendor/rmccue/requests/examples/cookie_jar.php
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
// First, include Requests
|
||||
include('../library/Requests.php');
|
||||
|
||||
// Next, make sure Requests can load internal classes
|
||||
Requests::register_autoloader();
|
||||
|
||||
// Say you need to fake a login cookie
|
||||
$c = new Requests_Cookie_Jar(['login_uid' => 'something']);
|
||||
|
||||
// Now let's make a request!
|
||||
$request = Requests::get(
|
||||
'http://httpbin.org/cookies', // Url
|
||||
[], // No need to set the headers the Jar does this for us
|
||||
['cookies' => $c] // Pass in the Jar as an option
|
||||
);
|
||||
|
||||
// Check what we received
|
||||
var_dump($request);
|
||||
Loading…
Add table
Add a link
Reference in a new issue