Hey team, In my application, I require request he...
# pact-js
h
Hey team, In my application, I require request headers that are derived from the current date/time and a private key. I am now experiencing intermittent timing issues in my consumer tests because of this, I set
withRequest
with a header that is calculated at run time, but then my actual application code executes a second or two later, and generates a slightly different header since the time is off by a second or two. I tried to use Matchers, but then those matches get sent to my provider within provider verification and fail since it is a malformed header and the service denies the request. Is there a workaround here? Can I specify a Matcher within
withRequest
but use the actual header from the application code to verify against the provider? New to pactflow and contract testing in general so apologies in advance! Any help would be greatly appreciated.
m
Have a read of that
h
Thanks @Matt (pactflow.io / pact-js / pact-go), I have added a request filter on the provider side to add the required headers.
party parrot 1