Skip to content

Instantly share code, notes, and snippets.

@apoca
Created June 5, 2015 11:14
Show Gist options
  • Save apoca/50085e1d98edd98f7980 to your computer and use it in GitHub Desktop.
Save apoca/50085e1d98edd98f7980 to your computer and use it in GitHub Desktop.
client
$http = new Client([
'base_uri' => 'http://esolidar-api',
]);
// print_r($http);
$request = $http->post('/users/auth', [
'json' => [
'username' => 'vieira@miguelvieira.com.pt',
'password' => 'Jk6gci3PyjhHk1'
]
]);
print_r($request);
$response = $http->send($request, [
'timeout' => 2
]);
echo $response->getBody();
// $response = $request->send();
exit();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment