diff options
author | Burdette Lamar <BurdetteLamar@Yahoo.com> | 2022-12-14 15:34:07 -0600 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2022-12-14 21:34:12 +0000 |
commit | d2b87456f0e0046630dea9dd7fae4ec6324e9e92 (patch) | |
tree | 43c5c5dff90eed8e99481f5b21a9d1ccfbc8cd0a /lib/net/http | |
parent | 693c01d50917071433ff1bc7c4d8ce626a12c48e (diff) | |
download | ruby-d2b87456f0e0046630dea9dd7fae4ec6324e9e92.tar.gz |
[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
Diffstat (limited to 'lib/net/http')
-rw-r--r-- | lib/net/http/header.rb | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/lib/net/http/header.rb b/lib/net/http/header.rb index f267bea13f..40c119a353 100644 --- a/lib/net/http/header.rb +++ b/lib/net/http/header.rb @@ -301,7 +301,7 @@ module Net::HTTPHeader @header[stringified_downcased_key].dup end - # :call-seq + # call-seq: # fetch(key, default_val = nil) {|key| ... } -> object # fetch(key, default_val = nil) -> value or default_val # @@ -540,7 +540,7 @@ module Net::HTTPHeader result end - # :call-seq: + # call-seq: # set_range(length) -> length # set_range(offset, length) -> range # set_range(begin..length) -> range @@ -772,6 +772,7 @@ module Net::HTTPHeader # application/x-www-form-urlencoded # # Example: + # # http.form_data = {"q" => "ruby", "lang" => "en"} # http.form_data = {"q" => ["ruby", "perl"], "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, # 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. - # * An options hash, supporting the following options, only - # used for file uploads: - # :filename :: The name of the file to use. - # :content_type :: The content type of the uploaded file. + # + # - The name of the field. + # - The value of the field, it should be a String or a File or IO-like. + # - An options hash, supporting the following options + # (used only for file uploads); entries: + # + # - +: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. # If +value+ is a File object or the +opt+ hash has a :filename key, @@ -818,6 +821,7 @@ module Net::HTTPHeader # chunked encoding. # # Example: + # # req.set_form([["q", "ruby"], ["lang", "en"]]) # # req.set_form({"f"=>File.open('/path/to/filename')}, |