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

Function getHeader

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

Source from the content-addressed store, hash-verified

1393}
1394
1395const getHeader = (headers: Headers.Headers, ...keys: Array<string>): string | undefined => {
1396 for (let i = 0; i < keys.length; i++) {
1397 const value = headers[keys[i]]
1398 if (value !== undefined) {
1399 return value
1400 }
1401 }
1402 return undefined
1403}
1404
1405/**
1406 * 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