src/Client/CurlHttpClient.php
private function call(RequestInterface $request)
    {
        $this->prepare($request);
        $result = curl_exec($this->handler);

        if (curl_errno($this->handler) !== 0) {
            throw new RuntimeException(
                "Error connecting to server: ".curl_error($this->handler)
            );
        }

        $response = $this->createResponse($result);

        $this->checkClientError($response, $request);

        $this->checkServerError($response, $request);

        return $response;
    }
private function call(RequestInterface $request)
    {
        $this->prepare($request);
        $result = curl_exec($this->handler);

        if (curl_errno($this->handler) !== 0) {
            throw new RuntimeException(
                "Error connecting to server: ".curl_error($this->handler)
            );
        }

        $response = $this->createResponse($result);

        $this->checkClientError($response, $request);

        $this->checkServerError($response, $request);

        return $response;
    }
Call the HTTP server returning the response

@param RequestInterface $request

@return Response

@throws RuntimeException If any error occur while preparing and connecting to the server
@throws ClientErrorException for responses with status codes between 400 and 499
@throws ServerErrorException for responses with status codes grater or equal to 500