public PactDslRequestWithPath matchHeader(String header, String regex, String headerExample) {
        requestMatchers.addCategory("header").setRule(header, new RegexMatcher(regex));
        requestHeaders.put(header, Collections.singletonList(headerExample));
        return this;
    }
public PactDslRequestWithPath matchHeader ( String header , String regex , String headerExample ) { requestMatchers . addCategory ( "header" ) . setRule ( header , new RegexMatcher ( regex ) ) ; requestHeaders . put ( header , Collections . singletonList ( headerExample ) ) ; return this ; }
Match a request header.

@param header        Header to match
@param regex         Regular expression to match
@param headerExample Example value to use