MCPcopy Index your code
hub / github.com/github/copilot-sdk / headersToMultiMap

Function headersToMultiMap

nodejs/src/copilotRequestHandler.ts:728–742  ·  view source on GitHub ↗
(headers: Headers)

Source from the content-addressed store, hash-verified

726}
727
728function headersToMultiMap(headers: Headers): LlmInferenceHeaders {
729 const out: Record<string, string[]> = {};
730 headers.forEach((value, name) => {
731 if (name.toLowerCase() === "set-cookie") {
732 return;
733 }
734 const list = out[name] ?? (out[name] = []);
735 list.push(value);
736 });
737 const setCookies = headers.getSetCookie();
738 if (setCookies.length > 0) {
739 out["set-cookie"] = setCookies;
740 }
741 return out;
742}
743
744function decodeChunkData(data: string, binary: boolean): Uint8Array {
745 if (binary) {

Callers 1

streamResponseFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…