Last active
August 24, 2016 17:26
-
-
Save mosampaio/6ed253abd572b6ac45828d7ea99cde36 to your computer and use it in GitHub Desktop.
How to consume a json Rest API with PHP using Unirest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require __DIR__ . '/vendor/autoload.php'; | |
$response = Unirest\Request::get('https://api.github.com/repos/twilio/twilio-php/contributors'); | |
print_r($response->body); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"require": { | |
"mashape/unirest-php": "3.*" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment