hasHeader function

Matcher hasHeader(
  1. String key, [
  2. dynamic value
])

Expects a response to have a header named key which contains value. value can be a String, or a List of Strings.

If value is true (default), then this matcher will simply assert that the header is present.

Implementation

Matcher hasHeader(String key, [value]) => _HasHeader(key, value ?? true);