webmock icon indicating copy to clipboard operation
webmock copied to clipboard

Assert that a request was made via a proxy server

Open mikebaldry opened this issue 6 years ago • 4 comments

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?

mikebaldry avatar Mar 22 '18 16:03 mikebaldry

+1

asoong avatar Apr 09 '18 22:04 asoong

@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.

bblimke avatar Apr 29 '18 22:04 bblimke

Any news about it?

juliofalbo avatar Nov 18 '20 16:11 juliofalbo

I'm not aware of anyone working or planning to work on adding support for that.

bblimke avatar Nov 18 '20 19:11 bblimke