protected function sendRequest(RequestInterface $request)
    {
        try {
            $response = $this->httpClient->send(
                $request,
                $this->getRequestOptions()
            );

            $this->multipartResources = [];

            return json_decode($response->getBody());
        } catch (RequestException $e) {
            $this->throwRequestException($e);
        }
    }
protected function sendRequest(RequestInterface $request)
    {
        try {
            $response = $this->httpClient->send(
                $request,
                $this->getRequestOptions()
            );

            $this->multipartResources = [];

            return json_decode($response->getBody());
        } catch (RequestException $e) {
            $this->throwRequestException($e);
        }
    }
protected function sendRequest ( RequestInterface $ request ) { try { $ response = $ this -> httpClient -> send ( $ request , $ this -> getRequestOptions ( ) ) ; $ this -> multipartResources = [ ] ; return json_decode ( $ response -> getBody ( ) ) ; } catch ( RequestException $ e ) { $ this -> throwRequestException ( $ e ) ; } }
Retrieves http response for a given request.

@param  RequestInterface $request

@return object
@throws Exceptions\Exception
Retrieves http response for a given request .