Module | OpenURI::Meta |
In: |
lib/open-uri.rb
|
Mixin for holding meta-information.
RE_LWS | = | /[\r\n\t ]+/n |
RE_TOKEN | = | %r{[^\x00- ()<>@,;:\\"/\[\]?={}\x7f]+}n |
RE_QUOTED_STRING | = | %r{"(?:[\r\n\t !#-\[\]-~\x80-\xff]|\\[\x00-\x7f])*"}n |
RE_PARAMETERS | = | %r{(?:;#{RE_LWS}?#{RE_TOKEN}#{RE_LWS}?=#{RE_LWS}?(?:#{RE_TOKEN}|#{RE_QUOTED_STRING})#{RE_LWS}?)*}n |
base_uri | [RW] | returns a URI which is base of relative URIs in the data. It may differ from the URI supplied by a user because redirection. |
meta | [R] | returns a Hash which represents header fields. The Hash keys are downcased for canonicalization. |
status | [RW] | returns an Array which consists status code and message. |
returns a charset parameter in Content-Type field. It is downcased for canonicalization.
If charset parameter is not given but a block is given, the block is called and its result is returned. It can be used to guess charset.
If charset parameter and block is not given, nil is returned except text type in HTTP. In that case, "iso-8859-1" is returned as defined by RFC2616 3.7.1.
ruby-doc.org is a service of James Britt and Neurogami, a Ruby application development company in Phoenix, AZ.
Documentation content on ruby-doc.org is provided by remarkable members of the Ruby community.
For more information on the Ruby programming language, visit ruby-lang.org.
Want to help improve Ruby's API docs? See Ruby Documentation Guidelines.