Lines Matching refs:headers
13 const kProxyHeaders = Symbol('proxy headers')
66 this[kProxyHeaders] = opts.headers || {}
98 headers: {
127 const headers = buildHeaders(opts.headers)
128 throwIfProxyAuthIsSent(headers)
132 headers: {
133 ...headers,
153 * @param {string[] | Record<string, string>} headers
156 function buildHeaders (headers) {
157 // When using undici.fetch, the headers list is stored
159 if (Array.isArray(headers)) {
163 for (let i = 0; i < headers.length; i += 2) {
164 headersPair[headers[i]] = headers[i + 1]
170 return headers
174 * @param {Record<string, string>} headers
176 * Previous versions of ProxyAgent suggests the Proxy-Authorization in request headers
181 function throwIfProxyAuthIsSent (headers) {
182 const existProxyAuth = headers && Object.keys(headers)