public function makeRequest($method, $endpoint, $body = [], $asArray = true)
    {
        try {
            list($rawBody, $httpStatusCode, $httpHeader) = $this->getHttpClient()->request(
                $method,
                $this->makeAbsUrl($endpoint),
                ['api_key' => $this->apiKey],
                $body
            );

            $array = json_decode($rawBody, true);
        } catch (\Exception $e) {
            throw new ApiError($e->getMessage(), $body);
        }

        if ($asArray) {
            return $array;
        }
        return [$rawBody, $httpStatusCode, $httpHeader];
    }