Response::getStatus()

int getStatus() Gets the response status code. Return Value int The response status code

Response::getProtocolVersion()

string getProtocolVersion() Gets the HTTP protocol version. Return Value string The HTTP protocol version

Response::getMaxAge()

int|null getMaxAge() Returns the number of seconds after the time specified in the response's Date header when the response should no longer be considered fresh. First, it checks for a s-maxage directive, then a max-age directive, and then it falls back on an expires header. It returns null when no maximum age can be established. Return Value int|null Number of seconds

Response::getLastModified()

DateTime|null getLastModified() Returns the Last-Modified HTTP header as a DateTime instance. Return Value DateTime|null A DateTime instance or null if the header does not exist Exceptions RuntimeException When the HTTP header is not parseable

Response::getHeaders()

array getHeaders() Gets the response headers. Return Value array The response headers

Response::getHeader()

string|array getHeader(string $header, bool $first = true) Gets a response header. Parameters string $header The header name bool $first Whether to return the first value or all header values Return Value string|array The first header value if $first is true, an array of values otherwise

Response::getExpires()

DateTime|null getExpires() Returns the value of the Expires header as a DateTime instance. Return Value DateTime|null A DateTime instance or null if the header does not exist

Response::getEtag()

string|null getEtag() Returns the literal value of the ETag HTTP header. Return Value string|null The ETag HTTP header or null if it does not exist

Response::getDate()

DateTime getDate() Returns the Date header as a DateTime instance. Return Value DateTime A \DateTime instance Exceptions RuntimeException When the header is not parseable

Response::getContent()

string getContent() Gets the current response content. Return Value string Content