webmock
webmock copied to clipboard
Assert that a request was made via a proxy server
I'm looking to write a test that ensures a http request happened, via a certain proxy server.
I can't seem to see any way to do that. Is it something you'd consider adding?
stub_request(:post, "www.example.com").
with(body: /world$/, headers: {"Content-Type" => /image\/.+/}, proxy: "http://myproxy.com").
to_return(body: "abc")
perhaps?
+1
@mikebaldry thank you for your suggestion. It sounds like a useful feature. It will have to wait though, unless someone submits a pull request with support for proxy.
Any news about it?
I'm not aware of anyone working or planning to work on adding support for that.