RequestPlugin
Type. Request lifecycle plugin hooks.
Table of contents
Category
Type
Type import
tsimport type { RequestPlugin } from "valyrian.js/request";Public signature
tsinterface RequestPlugin { name?: string; request?: (context: RequestContext) => RequestContext | Promise<RequestContext | void> | void; response?: (context: ResponseContext) => ResponseContext | Promise<ResponseContext | void> | void; error?: (context: ErrorContext) => ErrorContext | Promise<ErrorContext | void> | void; }Type usage
RequestPlugin defines optional request, response and error hooks used in registration order by a RequestInterface.