hibri / HttpMock

A library for creating Http servers on the fly in tests and stubbing responses
MIT License
128 stars 44 forks source link

Support matching on request headers #71

Closed adamreeve closed 7 years ago

adamreeve commented 7 years ago

It would be useful to be able to match a request header so that different responses could be returned depending on the header value. For example a different response could be configured for different values of the Accept-Language header. I'd be happy to implement this if you're OK with adding this feature.

hibri commented 7 years ago

Hi @adamreeve I'd be happy to see an implementation for this. Could you try out an initial PoC for this ?