-
-
Notifications
You must be signed in to change notification settings - Fork 481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a PactDslResponse matchHeader with noRegexp? #512
Comments
The default is to match using equality. Just use |
Ok. I thought that message should be used when I want to match ALL headers. But I am only interested in one header. I do not care for the others. |
It should be used to specify only the headers you want to match on (not all headers). You can set your single header value there. |
I could change the documentation of
|
With the additional information the issue is closed for me. |
Would it be possible to provide a method matchHeaderExact(header, example) to PactDSLResponse that it is possible to add a header without a regexp?
My use-case: I like to test whether the expected media-type is returned from the server. I found a workaround to provide it like
.matchHeader("Content-Type", ".", "application/vnd.ehmkah.app-1.0+json")
which makes it difficult to read. Or is that the way I should do it with pact?The text was updated successfully, but these errors were encountered: