The headers to normalize. Can be:
A normalized Record containing the header key-value pairs
// With Headers instance
const headers1 = new Headers([['content-type', 'application/json']]);
const normalized1 = normalizeHeaders(headers1);
// With plain object
const headers2 = { 'content-type': 'application/json' };
const normalized2 = normalizeHeaders(headers2);
// With array of pairs
const headers3 = [['content-type', 'application/json']];
const normalized3 = normalizeHeaders(headers3);
Normalizes various header formats into a consistent Record format.
This function accepts headers in multiple formats and converts them to a Record<string, HeaderValue | readonly HeaderValue[]> for consistent handling.