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

Function getStatusEntry

packages/effect/src/unstable/httpapi/HttpApiEndpoint.ts:1242–1256  ·  view source on GitHub ↗
(
  statuses: Map<number, {
    readonly stream?: HttpApiSchema.StreamSchema | undefined
    bufferedContentTypes: Set<string>
    noContent: boolean
  }>,
  status: number
)

Source from the content-addressed store, hash-verified

1240}
1241
1242function getStatusEntry(
1243 statuses: Map<number, {
1244 readonly stream?: HttpApiSchema.StreamSchema | undefined
1245 bufferedContentTypes: Set<string>
1246 noContent: boolean
1247 }>,
1248 status: number
1249) {
1250 let entry = statuses.get(status)
1251 if (entry === undefined) {
1252 entry = { bufferedContentTypes: new Set(), noContent: false }
1253 statuses.set(status, entry)
1254 }
1255 return entry
1256}
1257
1258function validateResponseExclusivity(
1259 schemas: ReadonlyArray<Schema.Constraint>,

Callers 1

validateSuccessResponseFunction · 0.85

Calls 2

getMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected