@@ -301,7 +301,7 @@ def get_fields(key)
301
301
@header [ stringified_downcased_key ] . dup
302
302
end
303
303
304
- # : call-seq
304
+ # call-seq:
305
305
# fetch(key, default_val = nil) {|key| ... } -> object
306
306
# fetch(key, default_val = nil) -> value or default_val
307
307
#
@@ -540,7 +540,7 @@ def range
540
540
result
541
541
end
542
542
543
- # : call-seq:
543
+ # call-seq:
544
544
# set_range(length) -> length
545
545
# set_range(offset, length) -> range
546
546
# set_range(begin..length) -> range
@@ -772,6 +772,7 @@ def set_content_type(type, params = {})
772
772
# application/x-www-form-urlencoded
773
773
#
774
774
# Example:
775
+ #
775
776
# http.form_data = {"q" => "ruby", "lang" => "en"}
776
777
# http.form_data = {"q" => ["ruby", "perl"], "lang" => "en"}
777
778
# http.set_form_data({"q" => "ruby", "lang" => "en"}, ';')
@@ -801,12 +802,14 @@ def set_form_data(params, sep = '&')
801
802
#
802
803
# Each item of params should respond to +each+ and yield 2-3 arguments,
803
804
# or an array of 2-3 elements. The arguments yielded should be:
804
- # * The name of the field.
805
- # * The value of the field, it should be a String or a File or IO-like.
806
- # * An options hash, supporting the following options, only
807
- # used for file uploads:
808
- # :filename :: The name of the file to use.
809
- # :content_type :: The content type of the uploaded file.
805
+ #
806
+ # - The name of the field.
807
+ # - The value of the field, it should be a String or a File or IO-like.
808
+ # - An options hash, supporting the following options
809
+ # (used only for file uploads); entries:
810
+ #
811
+ # - +:filename+: The name of the file to use.
812
+ # - +:content_type+: The content type of the uploaded file.
810
813
#
811
814
# Each item is a file field or a normal field.
812
815
# If +value+ is a File object or the +opt+ hash has a :filename key,
@@ -818,6 +821,7 @@ def set_form_data(params, sep = '&')
818
821
# chunked encoding.
819
822
#
820
823
# Example:
824
+ #
821
825
# req.set_form([["q", "ruby"], ["lang", "en"]])
822
826
#
823
827
# req.set_form({"f"=>File.open('/path/to/filename')},
0 commit comments