Interface preSerializationHookHandler<PreSerializationPayload, RawServer, RawRequest, RawReply, RouteGeneric, ContextConfig, SchemaCompiler, TypeProvider, Logger> interface preSerializationHookHandler < PreSerializationPayload , RawServer , RawRequest , RawReply , RouteGeneric , ContextConfig , SchemaCompiler , TypeProvider , Logger > ( ( this ,
request ,
reply ,
payload ,
done ) => void ) pre Serialization Hook Handler ( this , request , reply , payload , done ) : void Parameters this : FastifyInstance < RawServer , RawRequest , RawReply , Logger , TypeProvider > request : FastifyRequest < RouteGeneric , RawServer , RawRequest , SchemaCompiler , TypeProvider , ContextConfig , Logger , ResolveFastifyRequestType < TypeProvider , SchemaCompiler , RouteGeneric > > reply : FastifyReply < RawServer , RawRequest , RawReply , RouteGeneric , ContextConfig , SchemaCompiler , TypeProvider , UndefinedToUnknown < KeysOf < RouteGeneric [ "Reply" ] > extends never ? ResolveReplyFromSchemaCompiler < TypeProvider , SchemaCompiler > : RouteGeneric [ "Reply" ] > > payload : PreSerializationPayload done : DoneFuncWithErrOrRes Returns void Defined in node_modules/fastify/types/hooks.d.ts:275
preSerializationis the fifth hook to be executed in the request lifecycle. The previous hook waspreHandler, the next hook will beonSend. Note: the hook is NOT called if the payload is a string, a Buffer, a stream or null.