handling insert errors when posting to a form

J

Jon Johnson

I'm working on a ruby script to automate posting to a form. I have some
code like this:

Code:
res=Net::HTTP.new(url.host, url.port).start {|http| http.request(req)
}
p res
case res
when Net::HTTPSuccess, Net::HTTPRedirection
puts "it worked"
puts res.class
else
puts "it didn't work"
end

The problem I have is that if the scripting langauge on the form (php in
this case) errors out, I don't know since it will return a 200 response
code. Is there any way to access the error data better.

thanks

-j
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,757
Messages
2,569,543
Members
45,026
Latest member
camilin05

Latest Threads

Top