compileHeader method

Map<String, String>? compileHeader(
  1. Map<String, String>? globalHeaders,
  2. Map<String, String>? headers
)

Implementation

Map<String, String>? compileHeader(
  Map<String, String>? globalHeaders,
  Map<String, String>? headers,
) {
  if (globalHeaders != null) {
    if (headers != null) {
      for (var key in headers.keys) {
        globalHeaders[key] = headers[key]!;
      }
      return globalHeaders;
    } else {
      return globalHeaders;
    }
  } else {
    return headers;
  }
}