MCPcopy Index your code
hub / github.com/Kong/httpsnippet / getHeader

Function getHeader

src/helpers/headers.ts:12–18  ·  view source on GitHub ↗
(headers: Headers<T>, name: string)

Source from the content-addressed store, hash-verified

10 * Given a headers object retrieve the contents of a header out of it via a case-insensitive key.
11 */
12export const getHeader = <T>(headers: Headers<T>, name: string) => {
13 const headerName = getHeaderName(headers, name);
14 if (!headerName) {
15 return undefined;
16 }
17 return headers[headerName];
18};
19
20/**
21 * Determine if a given case-insensitive header exists within a header object.

Callers 11

headers.test.tsFile · 0.90
client.tsFile · 0.90
client.tsFile · 0.90
client.tsFile · 0.90
client.tsFile · 0.90
client.tsFile · 0.90
client.tsFile · 0.90
getDecompressionMethodsFunction · 0.90
client.tsFile · 0.90
client.tsFile · 0.90
convertFunction · 0.90

Calls 1

getHeaderNameFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…