Class FTW::Response
In: lib/ftw/response.rb
lib/ftw/response.rb
Parent: Object

An HTTP Response.

See RFC2616 section 6: <tools.ietf.org/html/rfc2616#section-6>

Methods

error?   error?   new   new   redirect?   redirect?   status=   status=   status_line   status_line   upgrade?   upgrade?  

Included Modules

FTW::HTTP::Message FTW::Protocol FTW::HTTP::Message FTW::Protocol

Constants

STATUS_REASON_MAP = { 100 => "Continue", 101 => "Switching Protocols", 200 => "OK", 201 => "Created", 202 => "Accepted", 203 => "Non-Authoritative Information", 204 => "No Content", 205 => "Reset Content", 206 => "Partial Content", 300 => "Multiple Choices", 301 => "Moved Permanently", 302 => "Found", 303 => "See Other", 304 => "Not Modified", 305 => "Use Proxy", 307 => "Temporary Redirect", 400 => "Bad Request", 401 => "Unauthorized", 402 => "Payment Required", 403 => "Forbidden", 404 => "Not Found", 405 => "Method Not Allowed", 406 => "Not Acceptable"   Translated from the recommendations listed in RFC2616 section 6.1.1 See RFC2616 section 6.1.1: <tools.ietf.org/html/rfc2616#section-6.1.1>
STATUS_REASON_MAP = { 100 => "Continue", 101 => "Switching Protocols", 200 => "OK", 201 => "Created", 202 => "Accepted", 203 => "Non-Authoritative Information", 204 => "No Content", 205 => "Reset Content", 206 => "Partial Content", 300 => "Multiple Choices", 301 => "Moved Permanently", 302 => "Found", 303 => "See Other", 304 => "Not Modified", 305 => "Use Proxy", 307 => "Temporary Redirect", 400 => "Bad Request", 401 => "Unauthorized", 402 => "Payment Required", 403 => "Forbidden", 404 => "Not Found", 405 => "Method Not Allowed", 406 => "Not Acceptable"   Translated from the recommendations listed in RFC2616 section 6.1.1 See RFC2616 section 6.1.1: <tools.ietf.org/html/rfc2616#section-6.1.1>

Attributes

reason  [R]  The reason phrase (RFC2616 6.1.1) See RFC2616 section 6.1.1: <tools.ietf.org/html/rfc2616#section-6.1.1>
reason  [R]  The reason phrase (RFC2616 6.1.1) See RFC2616 section 6.1.1: <tools.ietf.org/html/rfc2616#section-6.1.1>
status  [R]  The http status code (RFC2616 6.1.1) See RFC2616 section 6.1.1: <tools.ietf.org/html/rfc2616#section-6.1.1>
status  [R]  The http status code (RFC2616 6.1.1) See RFC2616 section 6.1.1: <tools.ietf.org/html/rfc2616#section-6.1.1>

Public Class methods

Create a new Response.

Create a new Response.

Public Instance methods

Is this response an error?

Is this response an error?

Is this response a redirect?

Is this response a redirect?

Set the status code

Set the status code

Get the status-line string, like "HTTP/1.0 200 OK"

Get the status-line string, like "HTTP/1.0 200 OK"

Is this Response the result of a successful Upgrade request?

Is this Response the result of a successful Upgrade request?

[Validate]