Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
handling insert errors when posting to a form
Jon Johnson
1/26/2007 1:19:00 AM
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
[/code]
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
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
handling insert errors when posting to a form
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password