Class | HTTP::Message::Headers
In: | lib/facets/more/http.rb
Parent: | Object

# HTTP message header.

A class that describes header part of HTTP message.

### Methods

[] []= body_size= contenttype contenttype= dump get init_request init_response new response_status_code= set

### Constants

StatusCodeMap | = | { Status::OK => 'OK', Status::MOVED_PERMANENTLY => 'Moved Permanently', Status::FOUND => 'Found', Status::SEE_OTHER => 'See Other', Status::TEMPORARY_REDIRECT => 'Temporary Redirect', Status::MOVED_TEMPORARILY => 'Temporary Redirect', Status::BAD_REQUEST => 'Bad Request', Status::INTERNAL => 'Internal Server Error', }
CharsetMap | = | { 'NONE' => 'us-ascii', 'EUC' => 'euc-jp', 'SJIS' => 'shift_jis', 'UTF8' => 'utf-8', }

### Attributes

body_charset | [RW] | Charset.
body_date | [RW] | A milestone of body.
body_size | [R] | Size of body.
body_type | [RW] | Content-type.
chunked | [R] | Chunked or not.
http_version | [RW] | HTTP version string in a HTTP header.
reason_phrase | [RW] | HTTP status reason phrase.
request_method | [R] | Request method.
request_uri | [R] | Requested URI.
request_via_proxy | [RW] |
response_status_code | [R] |

### Public Class methods

new()

SYNOPSIS

      HTTP::Message.new

ARGS

      N/A

DESCRIPTION

      Create a instance of HTTP request or HTTP response.  Specify
      status_code for HTTP response.

### Public Instance methods

[](key)
[]=(key, value)
body_size=(body_size)

body_size == nil means that the body is_a? IO

contenttype()
contenttype=(contenttype)
dump(dev = '')
get(key = nil)
init_request(method, uri, query = nil, via_proxy = nil)
init_response(status_code)
response_status_code=(status_code)
set(key, value)

[Validate]