Response::prepare()

Response prepare(Request $request) Prepares the Response before it is sent to the client. This method tweaks the Response to ensure that it is compliant with RFC 2616. Most of the changes are based on the Request that is "associated" with this Response. Parameters Request $request A Request instance Return Value Response The current response

Response::isSuccessful()

bool isSuccessful() Is response successful? Return Value bool

Response::isRedirection()

bool isRedirection() Is the response a redirect? Return Value bool

Response::isValidateable()

bool isValidateable() Returns true if the response includes headers that can be used to validate the response with the origin server using a conditional GET request. Return Value bool true if the response is validateable, false otherwise

Response::isServerError()

bool isServerError() Was there a server side error? Return Value bool

Response::isRedirect()

bool isRedirect(string $location = null) Is the response a redirect of some form? Parameters string $location Return Value bool

Response::isNotModified()

bool isNotModified(Request $request) Determines if the Response validators (ETag, Last-Modified) match a conditional value specified in the Request. If the Response is not modified, it sets the status code to 304 and removes the actual content by calling the setNotModified() method. Parameters Request $request A Request instance Return Value bool true if the Response validators match the Request, false otherwise

Response::isNotFound()

bool isNotFound() Is the response a not found error? Return Value bool

Response::isOk()

bool isOk() Is the response OK? Return Value bool

Response::isFresh()

bool isFresh() Returns true if the response is "fresh". Fresh responses may be served from cache without any interaction with the origin. A response is considered fresh when it includes a Cache-Control/max-age indicator or Expires header and the calculated age is less than the freshness lifetime. Return Value bool true if the response is fresh, false otherwise