MCPcopy Create free account
hub / github.com/nodejs/node / buildHeaders

Function buildHeaders

deps/undici/undici.js:11354–11366  ·  view source on GitHub ↗
(headers)

Source from the content-addressed store, hash-verified

11352 }
11353 };
11354 function buildHeaders(headers) {
11355 if (Array.isArray(headers)) {
11356 const headersPair = {};
11357 for (let i = 0; i < headers.length; i += 2) {
11358 if (isProxyAuthorizationHeader(headers[i])) {
11359 throwProxyAuthError();
11360 }
11361 headersPair[headers[i]] = headers[i + 1];
11362 }
11363 return headersPair;
11364 }
11365 return headers;
11366 }
11367 __name(buildHeaders, "buildHeaders");
11368 function throwIfProxyAuthIsSent(headers) {
11369 for (const key in headers) {

Callers 1

dispatchMethod · 0.70

Calls 2

throwProxyAuthErrorFunction · 0.70

Tested by

no test coverage detected