TimeoutError in Net::HTTP get and post

C

Carl Youngblood

I'm trying to rescue a TimeoutError in Net::HTTP's get and post methods,
but it's not working. I noticed some postings about how the rescue
catch-all didn't work any more for TimeoutErrors, but I can't even
explicitly rescue this error. I know the page is available and that
retrying will work, in this case, and all I want is a quick and dirty
way of scraping some web pages, but this error brings down my script.
Here's my code:

begin
resp, data = h.post('/tsd_listings/tsd_search.fpl', postdata, headers)
rescue TimeoutError => e
retry
end

Thanks in advance for your help.

Carl Youngblood

P.S. I'm using Ruby 1.8.0
 
C

Carl Youngblood

Was this just a stupid question or does nobody know the answer? Or
another option I guess would be that everyone is too busy.
 

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,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top