MCPcopy
hub / github.com/wavetermdev/waveterm / getSingleHeaderVal

Function getSingleHeaderVal

emain/emain-ipc.ts:52–61  ·  view source on GitHub ↗
(headers: Record<string, string | string[]>, key: string)

Source from the content-addressed store, hash-verified

50};
51
52function getSingleHeaderVal(headers: Record<string, string | string[]>, key: string): string {
53 const val = headers[key];
54 if (val == null) {
55 return null;
56 }
57 if (Array.isArray(val)) {
58 return val[0];
59 }
60 return val;
61}
62
63function cleanMimeType(mimeType: string): string {
64 if (mimeType == null) {

Callers 1

getUrlInSessionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected