Ruby proxy http headers

How do I add headers to a proxy request using Net/Http?

proxy = Net::HTTP::Proxy(proxy_host, proxy_port)
proxy.start(url) { |http|
res = http.get(’/’).body
}

compared to:
req = Net::HTTP::Post.new(uri.request_uri)
req[‘Host’]=$host
res = Net::HTTP.start(uri.hostname, uri.port) {|http|
http.request(req)
}

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs