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

Function handler

packages/platform/src/HttpApp.ts:301–306  ·  view source on GitHub ↗
(request: Request, context?: Context.Context<never> | undefined)

Source from the content-addressed store, hash-verified

299 // avoid an unhandled rejection, requests will still observe the failure
300 handlerPromise.catch(constVoid)
301 function handler(request: Request, context?: Context.Context<never> | undefined): Promise<Response> {
302 if (handlerCache) {
303 return handlerCache(request, context)
304 }
305 return handlerPromise.then((f) => f(request, context))
306 }
307 return { dispose, handler } as const
308}
309

Callers 12

onMessageFunction · 0.70
runFunction · 0.70
runRawFunction · 0.70
fromWebHandlerFunction · 0.70
HttpApp.test.tsFile · 0.50
requestFunction · 0.50
appendPreResponseHandlerFunction · 0.50
httpApp.tsFile · 0.50
emitFunction · 0.50

Calls 1

fFunction · 0.50

Tested by 1

requestFunction · 0.40