Guest User

Untitled

a guest
Mar 19th, 2018
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. $client = $this->client = new Client([
  2. 'base_uri' => 'https://xxx.xxxxxxxxxx.com/api/',
  3. 'timeout' => 15
  4. ]);
  5.  
  6. $this->requestConfig = [
  7. 'auth' => [
  8. 'xxxx@xx.xxx',
  9. 'xxxxx'
  10. ],
  11. 'headers' => [
  12. 'cache-control' => 'no-cache',
  13. 'content-type' => 'application/x-www-form-urlencoded'
  14. ],
  15.  
  16. ];
  17.  
  18. $response = $this->client->get($url, $this->requestConfig);
  19.  
  20. $content = $response->getBody()->getContents();
  21.  
  22. string(66) ""[{"ExternalId":"38","AgencyReference":"45436070356676"}]""
Add Comment
Please, Sign In to add comment