Skip to content

Instantly share code, notes, and snippets.

@aivis
Created February 27, 2017 08:01
Show Gist options
  • Select an option

  • Save aivis/f4e95741da95f8d8a80aea05f0450fa7 to your computer and use it in GitHub Desktop.

Select an option

Save aivis/f4e95741da95f8d8a80aea05f0450fa7 to your computer and use it in GitHub Desktop.
$guzzle = new \GuzzleHttp\Client();

// make sure your {YOUR-INPUT-KEY} is valid 
$res = $guzzle->request('POST', 'https://api.understand.io/{YOUR-INPUT-KEY}', [
    'json' => ['key2' => ['sub' => 123]]
]);

var_dump((string)$res->getBody()); // string(25) "{"count":1,"status":true}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment