Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'net/http'
- url = URI.parse("http://127.0.0.1:5509/?status=500")
- begin
- req = Net::HTTP.new(url.host, url.port)
- res = req.request(Net::HTTP::Get.new(url.request_uri))
- p res
- rescue Exception => e
- puts "Rescuing!"
- sleep 5
- retry
- end
Advertisement
Add Comment
Please, Sign In to add comment