S
soren.burkhart
I am having troubles posting data to a form.
It appears that all that is happening is that the form gets called, but
it does not pass the variables.
What am I doing wrong?
Soren
@http=Net::HTTP.new('www.secure.com', 443)
@http.use_ssl = true
@http.start() {|http|
req = Net::HTTP:
ost.new('/login')
req.set_form_data({'ID'=>'userid', 'Password'=>'password'})
res = http.request(req)
case res
when Net::HTTPSuccess, Net::HTTPRedirection
# OK
print res.body
else
res.error!
end
}
It appears that all that is happening is that the form gets called, but
it does not pass the variables.
What am I doing wrong?
Soren
@http=Net::HTTP.new('www.secure.com', 443)
@http.use_ssl = true
@http.start() {|http|
req = Net::HTTP:
req.set_form_data({'ID'=>'userid', 'Password'=>'password'})
res = http.request(req)
case res
when Net::HTTPSuccess, Net::HTTPRedirection
# OK
print res.body
else
res.error!
end
}