Type Alias: RineMiddleware¶
Defined in: rine-ts-sdk/src/api/middleware.ts:135
Functional middleware — Koa/Hono/Vercel-AI-SDK shape.
- Continue: call
next()and return (or return-from) itsResponse. - Short-circuit: do not call
next(). The downstream chain and the network request are both skipped. Middleware can synthesize aResponseto serve a cached/mocked reply. - Throw: propagates up the chain as a rejected promise.
Parameters¶
| Parameter | Type |
|---|---|
ctx |
RequestContext |
next |
() => Promise\<Response> |
Returns¶
Promise\<Response>