Actions
Bug #655
closedQuery part lost when using Net::HTTP.post_form function
Description
=begin
when posting data by following code:
require 'net/http'
require 'uri'
response = Net::HTTP.post_form URI.parse('http://localhost/api.asp?Action=Check'), {'name'=>'value'}
puts response.body
query part ("Action=Check" in this case) are not attached.
server side receive a request /api.asp without query.
problem could be solved by simple change post_form code:
req = Post.new(url.path)
to
req = Post.new(url.request_uri)
i'm not sure it is a bug or i mis-understand, if i do, is there anyway to post form with query, for i need to deal with some Third Part API.
=end
Actions
Like0
Like0Like0Like0Like0Like0Like0