Forum: Ruby handling insert errors when posting to a form

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Jon J. (Guest)
on 2007-01-26 03:19
I'm working on a ruby script to automate posting to a form. I have some
code like this:

[code], url.port).start {|http| http.request(req)
  p res
  case res
    when Net::HTTPSuccess, Net::HTTPRedirection
       puts "it worked"
       puts res.class
      puts "it didn't work"


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.


This topic is locked and can not be replied to.