Skip to content

Instantly share code, notes, and snippets.

@acolin
Created August 11, 2016 20:10
Show Gist options
  • Save acolin/f31134e614b27022fdf44833913f944b to your computer and use it in GitHub Desktop.
Save acolin/f31134e614b27022fdf44833913f944b to your computer and use it in GitHub Desktop.
<?php
$request = new HttpRequest();
$request->setUrl('http://54.191.139.107/api/v2/orders');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders(array(
'postman-token' => '39854a92-b45c-429d-d68b-17cf1c522be1',
'cache-control' => 'no-cache',
'authorization' => 'abcdefghijk',
'content-type' => 'application/json'
));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment