hibri / HttpMock

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

How can we mock response along with headers ? #80

Closed vkmasters closed 7 years ago

vkmasters commented 7 years ago

I am expecting a response along with the response header having eTag Value in it. How could it we achieve ?

hibri commented 7 years ago

You can use AddHeaders when building a stub to return the headers you want. It's not etag specific. You can add any header. WithHeader is used to match a request header.

vkmasters commented 7 years ago

Thanks hibri !