Returns a Range
object which represents the value of the Content-Range: header field. For a partial entity body, this indicates where this fragment fits inside the full entity body, as range of byte offsets.
Returns a content type string such as “text/html”. This method returns nil if Content-Type: header field does not exist.
Set
an HTML form data set. params
is the form data set; it is an Array of Arrays or a Hash
+enctype is the type to encode the form data set. It is application/x-www-form-urlencoded or multipart/form-data. formopt
is an optional hash to specify the detail.
the boundary of the multipart message
the charset of the message. All names and the values of non-file fields are encoded as the charset.
Each item of params is an array and contains following items:
name
the name of the field
value
the value of the field, it should be a String or a File
opt
an optional hash to specify additional information
Each item is a file field or a normal field. If value
is a File
object or the opt
have a filename key, the item is treated as a file field.
If Transfer-Encoding is set as chunked, this send the request in chunked encoding. Because chunked encoding is HTTP/1.1 feature, you must confirm the server to support HTTP/1.1 before sending it.
Example:
http.set_form([["q", "ruby"], ["lang", "en"]])
See also RFC 2388, RFC 2616, HTML 4.01, and HTML5
returns “type/subtype” which is MIME Content-Type. It is downcased for canonicalization. Content-Type parameters are stripped.
Returns a list of encodings in Content-Encoding field as an array of strings.
The encodings are downcased for canonicalization.
Helper method.
Fixed by Mike Stok
Kouhei fixed this too
UNTESTED
Visit all subnodes of self
recursively
Called when a tag is encountered. @p name the tag name @p attrs an array of arrays of attribute/value pairs, suitable for use with assoc or rassoc. IE, <tag attr1=“value1” attr2=“value2”> will result in tag_start
( “tag”, # [[“attr1”,“value1”],])
Adds a maker to the set of supported makers
Creates an unsigned certificate for subject
and key
. The lifetime of the key is from the current time to age
which defaults to one year.
The extensions
restrict the key to the indicated uses.
Use new_ui
for the duration of block
.