Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $client = new Client([
- 'verify' => false
- ]);
- try {
- $res = $client->post(
- $base_uri . $uri, [
- 'headers' => [
- 'content-type' => 'application/json',
- 'authorization' => $login['token'],
- ],
- 'form_params' => []
- ]
- );
- echo 'OK';
- return json_decode($res->getBody(), true);
- } catch (GuzzleHttpExceptionClientException $e) {
- echo 'ClientException';
- } catch (Exception $exc) {
- echo 'Exception';
- }
Add Comment
Please, Sign In to add comment