@@ -301,7 +301,7 @@ def get_fields(key)
301301 @header [ stringified_downcased_key ] . dup
302302 end
303303
304- # : call-seq
304+ # call-seq:
305305 # fetch(key, default_val = nil) {|key| ... } -> object
306306 # fetch(key, default_val = nil) -> value or default_val
307307 #
@@ -540,7 +540,7 @@ def range
540540 result
541541 end
542542
543- # : call-seq:
543+ # call-seq:
544544 # set_range(length) -> length
545545 # set_range(offset, length) -> range
546546 # set_range(begin..length) -> range
@@ -772,6 +772,7 @@ def set_content_type(type, params = {})
772772 # application/x-www-form-urlencoded
773773 #
774774 # Example:
775+ #
775776 # http.form_data = {"q" => "ruby", "lang" => "en"}
776777 # http.form_data = {"q" => ["ruby", "perl"], "lang" => "en"}
777778 # http.set_form_data({"q" => "ruby", "lang" => "en"}, ';')
@@ -801,12 +802,14 @@ def set_form_data(params, sep = '&')
801802 #
802803 # Each item of params should respond to +each+ and yield 2-3 arguments,
803804 # 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.
810813 #
811814 # Each item is a file field or a normal field.
812815 # If +value+ is a File object or the +opt+ hash has a :filename key,
@@ -818,6 +821,7 @@ def set_form_data(params, sep = '&')
818821 # chunked encoding.
819822 #
820823 # Example:
824+ #
821825 # req.set_form([["q", "ruby"], ["lang", "en"]])
822826 #
823827 # req.set_form({"f"=>File.open('/path/to/filename')},
0 commit comments