How to use GoProxies in Ruby?
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
In this guide, you'll learn how to utilize Ruby for sending traffic through GoProxies. Follow the steps below to efficiently manage your network traffic
Below you will find a straightforward example of sending a request through GoProxies in Ruby:
require 'uri'
require 'net/http'
uri = URI.parse('http://ipinfo.io')
proxy = Net::HTTP::Proxy('proxy.goproxies.com', 1080, 'customer-USERNAME-country-au', 'PASSWORD')
req = Net::HTTP::Get.new(uri)
result = proxy.start(uri.host, uri.port) do |http|
http.request(req)
end
puts result.body
Congratulations! You have successfully sent a request through our proxy. To change the country, select a different country code in ISO 3166-1 alpha-2 format, like GB or DE.