[ruby/net-http] [DOC] Correct formatting in header.rb
(https://github.com/ruby/net-http/pull/90) https://github.com/ruby/net-http/commit/d9d829ca53
This commit is contained in:
parent
693c01d509
commit
d2b87456f0
@ -301,7 +301,7 @@ module Net::HTTPHeader
|
|||||||
@header[stringified_downcased_key].dup
|
@header[stringified_downcased_key].dup
|
||||||
end
|
end
|
||||||
|
|
||||||
# :call-seq
|
# call-seq:
|
||||||
# fetch(key, default_val = nil) {|key| ... } -> object
|
# fetch(key, default_val = nil) {|key| ... } -> object
|
||||||
# fetch(key, default_val = nil) -> value or default_val
|
# fetch(key, default_val = nil) -> value or default_val
|
||||||
#
|
#
|
||||||
@ -540,7 +540,7 @@ module Net::HTTPHeader
|
|||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
# :call-seq:
|
# call-seq:
|
||||||
# set_range(length) -> length
|
# set_range(length) -> length
|
||||||
# set_range(offset, length) -> range
|
# set_range(offset, length) -> range
|
||||||
# set_range(begin..length) -> range
|
# set_range(begin..length) -> range
|
||||||
@ -772,6 +772,7 @@ module Net::HTTPHeader
|
|||||||
# application/x-www-form-urlencoded
|
# application/x-www-form-urlencoded
|
||||||
#
|
#
|
||||||
# Example:
|
# Example:
|
||||||
|
#
|
||||||
# http.form_data = {"q" => "ruby", "lang" => "en"}
|
# http.form_data = {"q" => "ruby", "lang" => "en"}
|
||||||
# http.form_data = {"q" => ["ruby", "perl"], "lang" => "en"}
|
# http.form_data = {"q" => ["ruby", "perl"], "lang" => "en"}
|
||||||
# http.set_form_data({"q" => "ruby", "lang" => "en"}, ';')
|
# http.set_form_data({"q" => "ruby", "lang" => "en"}, ';')
|
||||||
@ -801,12 +802,14 @@ module Net::HTTPHeader
|
|||||||
#
|
#
|
||||||
# Each item of params should respond to +each+ and yield 2-3 arguments,
|
# Each item of params should respond to +each+ and yield 2-3 arguments,
|
||||||
# or an array of 2-3 elements. The arguments yielded should be:
|
# or an array of 2-3 elements. The arguments yielded should be:
|
||||||
# * The name of the field.
|
#
|
||||||
# * The value of the field, it should be a String or a File or IO-like.
|
# - The name of the field.
|
||||||
# * An options hash, supporting the following options, only
|
# - The value of the field, it should be a String or a File or IO-like.
|
||||||
# used for file uploads:
|
# - An options hash, supporting the following options
|
||||||
# :filename :: The name of the file to use.
|
# (used only for file uploads); entries:
|
||||||
# :content_type :: The content type of the uploaded file.
|
#
|
||||||
|
# - +:filename+: The name of the file to use.
|
||||||
|
# - +:content_type+: The content type of the uploaded file.
|
||||||
#
|
#
|
||||||
# Each item is a file field or a normal field.
|
# Each item is a file field or a normal field.
|
||||||
# If +value+ is a File object or the +opt+ hash has a :filename key,
|
# If +value+ is a File object or the +opt+ hash has a :filename key,
|
||||||
@ -818,6 +821,7 @@ module Net::HTTPHeader
|
|||||||
# chunked encoding.
|
# chunked encoding.
|
||||||
#
|
#
|
||||||
# Example:
|
# Example:
|
||||||
|
#
|
||||||
# req.set_form([["q", "ruby"], ["lang", "en"]])
|
# req.set_form([["q", "ruby"], ["lang", "en"]])
|
||||||
#
|
#
|
||||||
# req.set_form({"f"=>File.open('/path/to/filename')},
|
# req.set_form({"f"=>File.open('/path/to/filename')},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user