withHeader method

Response withHeader(
  1. String name,
  2. String value
)

Copy with name set to value.

Implementation

Response withHeader(String name, String value) {
  final copy = headers.copy()..set(name, value);
  return _copyWith(headers: copy);
}