Guest User

Untitled

a guest
Nov 17th, 2014
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. require 'net/http'
  2.  
  3.  
  4. url = URI.parse("http://127.0.0.1:5509/?status=500")
  5. begin
  6. req = Net::HTTP.new(url.host, url.port)
  7. res = req.request(Net::HTTP::Get.new(url.request_uri))
  8. p res
  9. rescue Exception => e
  10. puts "Rescuing!"
  11. sleep 5
  12. retry
  13. end
Advertisement
Add Comment
Please, Sign In to add comment