clone method

Headers clone({
  1. Map<String, String>? headers,
})

Create a new Headers instance that has the same header values, and on top of that, it appends the specified values from the headers Map.

Implementation

Headers clone({Map<String, String>? headers}) {
  Headers h = Headers._(facade.Headers());
  for (String? key in keys()) {
    h[key] = this[key];
  }
  headers?.forEach(h.append);
  return h;
}