private function curlExec($curlHandle, $endPointUrl)
    {
        curl_setopt($curlHandle, CURLOPT_URL, $endPointUrl);

        if (($response = @curl_exec($curlHandle)) === false) {
            throw new \RuntimeException(
                sprintf(
                    'cURL Error (%d): %s',
                    curl_errno($curlHandle),
                    curl_error($curlHandle)
                )
            );
        }

		curl_close($curlHandle);

        $response_parts = explode("\r\n\r\n", $response);

        $content = array_pop($response_parts);

        $headers = explode("\r\n", array_pop($response_parts));

        return new Response($endPointUrl, $content, $headers);
    }
private function curlExec($curlHandle, $endPointUrl)
    {
        curl_setopt($curlHandle, CURLOPT_URL, $endPointUrl);

        if (($response = @curl_exec($curlHandle)) === false) {
            throw new \RuntimeException(
                sprintf(
                    'cURL Error (%d): %s',
                    curl_errno($curlHandle),
                    curl_error($curlHandle)
                )
            );
        }

		curl_close($curlHandle);

        $response_parts = explode("\r\n\r\n", $response);

        $content = array_pop($response_parts);

        $headers = explode("\r\n", array_pop($response_parts));

        return new Response($endPointUrl, $content, $headers);
    }
private function curlExec ( $ curlHandle , $ endPointUrl ) { curl_setopt ( $ curlHandle , CURLOPT_URL , $ endPointUrl ) ; if ( ( $ response = @ curl_exec ( $ curlHandle ) ) === false ) { throw new \ RuntimeException ( sprintf ( 'cURL Error (%d): %s' , curl_errno ( $ curlHandle ) , curl_error ( $ curlHandle ) ) ) ; } curl_close ( $ curlHandle ) ; $ response_parts = explode ( "\r\n\r\n" , $ response ) ; $ content = array_pop ( $ response_parts ) ; $ headers = explode ( "\r\n" , array_pop ( $ response_parts ) ) ; return new Response ( $ endPointUrl , $ content , $ headers ) ; }
Execute cURL request using the specified API EndPoint
@param mixed $curlHandle
@param mixed $endPointUrl
@return Response
Execute cURL request using the specified API EndPoint