set_form_data

set_form_data(params, sep = '&')
Instance Public methods

Set header fields and a body from HTML form data. params should be an Array of Arrays or a Hash containing HTML form data. Optional argument sep means data record separator.

Values are URL encoded as necessary and the content-type is set to 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"}, ';')

form_data=

doc_ruby_on_rails
2015-04-21 06:55:28
Comments
Leave a Comment

Please login to continue.