src/Api/Requester.php
public function sendRequest(RequestInterface $request): Message
    {
        $startTime = \microtime(true);

        $exception = null;
        try {
            $response = $this->httpClient->send($request);
        } catch (ClientException $exception) {
            $response = $exception->hasResponse()
                ? $exception->getResponse()
                : null;

            $exception = $this->createCustomException($exception);
        }

        $duration = \microtime(true) - $startTime;

        return new Message(
            $this->api,
            $duration,
            $request,
            $response,
            $exception
        );
    }
public function sendRequest(RequestInterface $request): Message
    {
        $startTime = \microtime(true);

        $exception = null;
        try {
            $response = $this->httpClient->send($request);
        } catch (ClientException $exception) {
            $response = $exception->hasResponse()
                ? $exception->getResponse()
                : null;

            $exception = $this->createCustomException($exception);
        }

        $duration = \microtime(true) - $startTime;

        return new Message(
            $this->api,
            $duration,
            $request,
            $response,
            $exception
        );
    }
public function sendRequest ( RequestInterface $ request ) : Message { $ startTime = \ microtime ( true ) ; $ exception = null ; try { $ response = $ this -> httpClient -> send ( $ request ) ; } catch ( ClientException $ exception ) { $ response = $ exception -> hasResponse ( ) ? $ exception -> getResponse ( ) : null ; $ exception = $ this -> createCustomException ( $ exception ) ; } $ duration = \ microtime ( true ) - $ startTime ; return new Message ( $ this -> api , $ duration , $ request , $ response , $ exception ) ; }
Queries the API, and returns a message object
which contains all information needed for processing and logging.

@param RequestInterface $request

@return Message
Queries the API and returns a message object which contains all information needed for processing and logging .