replaceRequest
Αυτό το περιεχόμενο δεν είναι ακόμη διαθέσιμο στη γλώσσα σου.
replaceRequest(
context,value):void
Defined in: packages/pipeline/src/helpers/replace-request.ts:22
Hands the handler value in place of its input, for a behavior that produces a new
value instead of changing the caller’s object, such as a validated, parsed copy. For a
wrapped function that takes several arguments, value is the new argument array.
Later behaviors see the replacement as context.request.
Parameters
Section titled “Parameters”context
Section titled “context”unknown
Returns
Section titled “Returns”void
Throws
Section titled “Throws”TypeError when the context does not support replacement, or when a multi-argument call receives a value that is not an array.
Example
Section titled “Example”async handle(context: IPipelineContext, next: NextDelegate) { replaceRequest(context, schema.parse(context.request)); return next();}