A {@link RequestMatcher} that can be used to match request that contain aheader with an expected header name and an expected value.
For example, the following will match an request that contains a header with the name X-Requested-With no matter what the value is.
RequestMatcher matcher = new RequestHeaderRequestMatcher("X-Requested-With");
Alternatively, the RequestHeaderRequestMatcher can be more precise and require a specific value. For example the following will match on requests with the header name of X-Requested-With with the value of "XMLHttpRequest", but will not match on header name of "X-Requested-With" with the value of "Other".
RequestMatcher matcher = new RequestHeaderRequestMatcher("X-Requested-With", "XMLHttpRequest");
The value used to compare is the first header value, so in the previous example if the header "X-Requested-With" contains the values "Other" and "XMLHttpRequest", then it will not match.
@author Rob Winch
@since 3.2