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

Method middleware

packages/effect/src/unstable/httpapi/HttpApi.ts:102–102  ·  view source on GitHub ↗

* Adds a middleware to every endpoint currently in the `HttpApi`. * * **Gotchas** * * Endpoints added after this method is called do not receive the middleware.

(
    middleware: Context.Key<I, S>
  )

Source from the content-addressed store, hash-verified

100 * Endpoints added after this method is called do not receive the middleware.
101 */
102 middleware<I extends HttpApiMiddleware.AnyId, S>(
103 middleware: Context.Key<I, S>
104 ): HttpApi<Id, HttpApiGroup.AddMiddleware<Groups, I>>
105

Callers 1

middlewareFunction · 0.65

Calls

no outgoing calls

Tested by

no test coverage detected