-
Make sure there is a mongodb instance running locally.
-
First export the environment variables.
export CLIENT_ID=your-client-id
export CLIENT_SECRET=your-client-secret
export DOMAIN_URL=your-domain-url
<?php | |
require __DIR__ . '/vendor/autoload.php'; | |
$url = "https://api.github.com/repos/twilio/twilio-php/contributors"; | |
$response = \Httpful\Request::get($url)->expectsJson()->send(); | |
print_r($response->body); |
<?php | |
require __DIR__ . '/vendor/autoload.php'; | |
use GuzzleHttp\Client; | |
$client = new Client([ | |
'base_uri' => 'https://api.github.com', | |
'timeout' => 5.0, | |
]); |
<?php | |
require __DIR__ . '/vendor/autoload.php'; | |
$response = Unirest\Request::get('https://api.github.com/repos/twilio/twilio-php/contributors'); | |
print_r($response->body); |