gabrielfalcao / HTTPretty

Intercept HTTP requests at the Python socket level. Fakes the whole socket module
https://httpretty.readthedocs.org
MIT License
2.11k stars 277 forks source link

Is there a support to match headers? #380

Open stribny opened 5 years ago

stribny commented 5 years ago

I'd like to be able to provide set of required headers to register_uri so that the URL is mocked only when the headers match. Is this possible?

jamesL92 commented 1 year ago

This would be handy for us too, as we're trying to use HTTPretty to test a SOAP API, where there's only a single IP and different "endpoints" are determined by a SOAPAction header only