Validates that a TestResponse has the specified HTTP headers.
This matcher only validates the HTTP headers. See hasResponse for more details. Usage:
var response = await client.request("/foo").get();
expect(response, hasHeaders(partial({"x-request-id": 4})));
Source
Matcher hasHeaders(Map<String, dynamic> matchers,
{bool failIfContainsUnmatchedHeader: false}) =>
new HTTPResponseMatcher(
null,
new HTTPHeaderMatcher(matchers, failIfContainsUnmatchedHeader),
null);