Created
December 1, 2009 19:28
-
-
Save oquno/246553 to your computer and use it in GitHub Desktop.
for using gyazo through kuins proxy server
This file contains 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
begin | |
http = Net::HTTP.new(HOST, 80) | |
http.open_timeout = 2 | |
res = http.post(CGI,data,header) | |
rescue Timeout::Error | |
http = Net::HTTP.new(HOST, 80, proxy_addr = 'proxy.kuins.net', proxy_port = 8080) | |
http.open_timeout = 2 | |
res = http.post(CGI,data,header) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment