Hello :wave: This might probably be a quick one, b...
# pact-jvm
d
Hello 👋 This might probably be a quick one, but it was not directly clear from the doc for me. I am using the newest Kotlin API. Are the methods
headers(...)
and
matchHeader(...)
, if not using REGEX in the first place, identical? I.e. do the following behave the same?
Copy code
builder
  .given(...)
  .uponReceiving(...)
  ...
  .headers("foo", "bar")
  // vs
  .matchHeader("foo", "bar")
(same goes for other similar methods that have a
matchXXX
equivalent)
1
u
headers
just sets the headers,
matchHeader
sets the headers and also sets up a regex matcher
d
so when not interested in regex, i.e. just having a static value that should be matched 1:1, we can just use
headers
and it will also assert that the header has been send?
u
It will send the header with the value, and then on the provider side it will check that it receives that header with the same value
d
that sounds like a yes then. alright, thank you! 👍