How do I configure a Ruby Mechanize agent to work through the Charles web proxy?
问题 I'm writing an "automatically fill in the forms" app using Ruby / Mechanize. It almost works. I can use the wonderful Charles web proxy to see the exchange between the server and my Firefox browser. Now I want to use Charles to see the exchange between the server and my app. Charles proxies on port 8888. Assume that the server is at https://my.host.com. One thing that does NOT work is: @agent ||= Mechanize.new do |agent| agent.set_proxy("my.host.com", 8888) end This results in a Net::HTTP: