MCPcopy Index your code
hub / github.com/forwardemail/superagent / mapToHttpHeader

Method mapToHttpHeader

src/node/http2wrapper.js:121–139  ·  view source on GitHub ↗
(headers)

Source from the content-addressed store, hash-verified

119 }
120
121 mapToHttpHeader(headers) {
122 const keys = Object.keys(headers);
123 const http2Headers = {};
124 for (let key of keys) {
125 let value = headers[key];
126 key = key.toLowerCase();
127 switch (key) {
128 case HTTP2_HEADER_SET_COOKIE:
129 value = Array.isArray(value) ? value : [value];
130 break;
131 default:
132 break;
133 }
134
135 http2Headers[key] = value;
136 }
137
138 return http2Headers;
139 }
140
141 mapToHttp2Header(headers) {
142 const keys = Object.keys(headers);

Callers 1

getFrameMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected