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

Function getHeaderName

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

Source from the content-addressed store, hash-verified

4 * Given a headers object retrieve a specific header out of it via a case-insensitive key.
5 */
6export const getHeaderName = <T>(headers: Headers<T>, name: string) =>
7 Object.keys(headers).find(header => header.toLowerCase() === name.toLowerCase());
8
9/**
10 * Given a headers object retrieve the contents of a header out of it via a case-insensitive key.

Callers 13

HTTPSnippetClass · 0.90
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
client.tsFile · 0.90
client.tsFile · 0.90
client.tsFile · 0.90
getHeaderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…