Module | FTW::HTTP::Message |
In: |
lib/ftw/http/message.rb
lib/ftw/http/message.rb |
HTTP Message, RFC2616 For specification, see RFC2616 section 4: <tools.ietf.org/html/rfc2616#section-4>
You probably won‘t use this class much. Instead, check out {FTW::Request} and {FTW::Response}
VALID_VERSIONS | = | [1.0, 1.1] | HTTP Versions that are valid. | |
UnsupportedHTTPVersion | = | Class.new(ArgumentError) | For backward-compatibility, this exception inherits from ArgumentError | |
VALID_VERSIONS | = | [1.0, 1.1] | HTTP Versions that are valid. | |
UnsupportedHTTPVersion | = | Class.new(ArgumentError) | For backward-compatibility, this exception inherits from ArgumentError |
headers | [R] | The HTTP headers - See {FTW::HTTP::Headers}. RFC2616 5.3 - <tools.ietf.org/html/rfc2616#section-5.3> |
headers | [R] | The HTTP headers - See {FTW::HTTP::Headers}. RFC2616 5.3 - <tools.ietf.org/html/rfc2616#section-5.3> |
version | [RW] | The HTTP version. See {VALID_VERSIONS} for valid versions. This will always be a Numeric object. Both Request and Responses have version, so put it in the parent class. |
version | [RW] | The HTTP version. See {VALID_VERSIONS} for valid versions. This will always be a Numeric object. Both Request and Responses have version, so put it in the parent class. |
Set a header field
@param [String] the name of the field. (case insensitive) @param [String] the value to set for this field
Set a header field
@param [String] the name of the field. (case insensitive) @param [String] the value to set for this field
Get the body of this message
Returns an Enumerable, IO-like object, or String, depending on how this message was built.
Get the body of this message
Returns an Enumerable, IO-like object, or String, depending on how this message was built.
Set the body of this message
The ‘message_body’ can be an IO-like object, Enumerable, or String.
See RFC2616 section 4.3: <tools.ietf.org/html/rfc2616#section-4.3>
Set the body of this message
The ‘message_body’ can be an IO-like object, Enumerable, or String.
See RFC2616 section 4.3: <tools.ietf.org/html/rfc2616#section-4.3>