private function getResponse($url, $options, $post)
    {
        if($post) {
            $response = $this->httpClient->post($url, $options);
        } else {
            $response = $this->httpClient->get($url, $options);
        }
        if( $response->getStatusCode() != 200 ) {
            $json = $response->json();
            $short = $json['error'];
            $error = $json['errorMessage'];
            $cause = $json['cause'];
            throw new APIRequestException(
                $short == null ? 'Unknown Error' : $short,
                $error == null ? 'Unknown Error' : $error,
                $cause == null ? '' : $cause
            );
        }
        return $response->json();
    }