Created
October 28, 2015 10:50
-
-
Save fxposter/cd4bd30e06de1478e6ba to your computer and use it in GitHub Desktop.
Net/HTTP with keep-alive, but without block
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http = Net::HTTP.new(uri.host, uri.port) | |
http.start | |
request1 = Net::HTTP::Get.new(uri1) | |
response1 = http.request(request1) | |
request2 = Net::HTTP::Get.new(uri2) | |
response2 = http.request(request2) | |
http.finish |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment