MCPcopy Create free account
hub / github.com/Effect-TS/effect / getHeader

Function getHeader

packages/effect/src/http/HttpClient.ts:1962–1970  ·  view source on GitHub ↗
(headers: Headers.Headers, ...keys: Array<string>)

Source from the content-addressed store, hash-verified

1960}
1961
1962const getHeader = (headers: Headers.Headers, ...keys: Array<string>): string | undefined => {
1963 for (let i = 0; i < keys.length; i++) {
1964 const value = headers[keys[i]]
1965 if (value !== undefined) {
1966 return value
1967 }
1968 }
1969 return undefined
1970}
1971
1972/**
1973 * Performs an additional effect after a successful request.

Callers 4

inspectResponseFunction · 0.85
parseRateLimitLimitFunction · 0.85
parseRateLimitRemainingFunction · 0.85
parseRateLimitWindowFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected