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)
}
···
--
Posted via http://www.ruby-forum.com/.