Skip to content

Instantly share code, notes, and snippets.

Created September 24, 2015 01:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/35c843c94c0c577f37ef to your computer and use it in GitHub Desktop.
Save anonymous/35c843c94c0c577f37ef to your computer and use it in GitHub Desktop.
def http_post_with_proxy(uri, data)
req = Net::HTTP.SOCKSProxy(@proxy_host,@proxy_port).start(uri.host, uri.port).post(uri.path)
req.set_form_data(data) unless data.empty?
@connection.request(req)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment