Aaccording to the docs, if reqHeaders
is not specified, it will skip them.
If no request headers are specified for mocking then Nock will
automatically skip matching of request headers
In case you're validating other headers, and if x-md5-checksum
is present, but you don't know it's value, you can use a function
or a regex
to validate any value, or just a valid md5
nock('http://www.example-com', {
reqHeaders: {
'x-md5-checksum': /[a-fA-F0-9]{32}/
// or
'x-md5-checksum': value => true // I don't care about the value
}
})
// or use .matchHeader
.matchHeader('x-md5-checksum', value => true)
.get('/')
.reply(200)