post_form(url, params)
Class Public methods
Posts HTML form data to the specified URI object. The form data must be provided as a Hash mapping from String to String. Example:
1 | { "cmd" => "search" , "q" => "ruby" , "max" => "50" } |
This method also does Basic Authentication iff url
.user
exists. But userinfo for authentication is deprecated (RFC3986). So this
feature will be removed.
Example:
1 2 3 4 5 | require 'net/http' require 'uri' { "q" => "ruby" , "max" => "50" } |
Please login to continue.