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

Function hasHeader

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

Source from the content-addressed store, hash-verified

21 * Determine if a given case-insensitive header exists within a header object.
22 */
23export const hasHeader = <T>(headers: Headers<T>, name: string) =>
24 Boolean(getHeaderName(headers, name));
25
26const mimeTypeJson = [
27 'application/json',

Callers 5

headers.test.tsFile · 0.90
client.tsFile · 0.90
client.tsFile · 0.90
client.tsFile · 0.90
client.tsFile · 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…