diff --git a/src/Api/Api.php b/src/Api/Api.php index 6a250e6..f9c9c74 100644 --- a/src/Api/Api.php +++ b/src/Api/Api.php @@ -139,7 +139,15 @@ public function execute($httpMethod, $url, array $parameters = []) try { $parameters = Utility::prepareParameters($parameters); - $response = $this->getClient()->{$httpMethod}('v1/'.$url, [ 'query' => $parameters ]); + if ($httpMethod === 'post') { + $response = $this->getClient()->post('v1/'.$url, [ + 'body' => $parameters, + ]); + } else { + $response = $this->getClient()->{$httpMethod}('v1/'.$url, [ + 'query' => $parameters, + ]); + } return json_decode((string) $response->getBody(), true); } catch (ClientException $e) {