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

Function handler

packages/effect/src/http/HttpEffect.ts:553–561  ·  view source on GitHub ↗
(
    request: Request,
    context?: Context.Context<ReqR> | undefined
  )

Source from the content-addressed store, hash-verified

551 readyPromise.catch(constVoid)
552 const ready = () => readyPromise
553 function handler(
554 request: Request,
555 context?: Context.Context<ReqR> | undefined
556 ): Promise<globalThis.Response> {
557 if (handlerCache) {
558 return handlerCache(request, context)
559 }
560 return readyPromise.then(() => handlerCache!(request, context))
561 }
562 return { dispose, ready, handler: handler as any } as const
563}
564

Callers 4

handleCauseFunction · 0.70
sendResponseFunction · 0.70
fromWebHandlerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected