Class CurlHttpResponse
Class representing HTTP response as returned from curl call.
- Class name: CurlHttpResponse
- Namespace: MikeBrant\RestClientLib
protected mixed $body = null
Variable to store response body
- Visibility: protected
protected integer $httpCode = null
Variable to store HTTP repsonse code
- Visibility: protected
protected string $contentType = null
Variable to store response content type header
- Visibility: protected
protected string $requestUrl = null
Variable to store URL used in request as reported via curl_getinfo().
- Visibility: protected
protected string $requestHeader = null
Variable to store header used in request as reported via curl_getinfo().
- Visibility: protected
protected array $curlGetinfo = null
Variable to store curl getinfo array.
See documentation at http://php.net/manual/en/function.curl-getinfo.php for expected array format.
- Visibility: protected
mixed MikeBrant\RestClientLib\CurlHttpResponse::__construct(mixed $responseBody, array $curlGetinfo)
Constructor method.
- Visibility: public
- $responseBody mixed - <p>Response body as returned from a curl request.</p>
- $curlGetinfo array - <p>Array returned form curl_getinfo() function call for request.</p>
mixed MikeBrant\RestClientLib\CurlHttpResponse::getBody()
Returns response body for request
- Visibility: public
integer MikeBrant\RestClientLib\CurlHttpResponse::getHttpCode()
Returns HTTP response code for request
- Visibility: public
string MikeBrant\RestClientLib\CurlHttpResponse::getRequestUrl()
Returns URL used in request as reported via curl_getinfo().
- Visibility: public
string MikeBrant\RestClientLib\CurlHttpResponse::getRequestHeader()
Returns header used in request as reported via curl_getinfo().
- Visibility: public
array MikeBrant\RestClientLib\CurlHttpResponse::getCurlGetinfo()
Returns curl getinfo array.
See documentation at http://php.net/manual/en/function.curl-getinfo.php for expected array format.
- Visibility: public
mixed MikeBrant\RestClientLib\CurlHttpResponse::validateGetinfoArray(array $getinfo)
Method to perform minimal validation of input array as having keys expected to be returned from curl_getinfo().
- Visibility: protected
- $getinfo array - <p>Array as returned from curl_getinfo()</p>