Interface preParsingHookHandler<RawServer, RawRequest, RawReply, RouteGeneric, ContextConfig, SchemaCompiler, TypeProvider, Logger> interface preParsingHookHandler < RawServer , RawRequest , RawReply , RouteGeneric , ContextConfig , SchemaCompiler , TypeProvider , Logger > ( ( this ,
request ,
reply ,
payload ,
done ) => void ) pre Parsing 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 : RequestPayload done : ( < TError > ( err ? , res ? ) => void ) < TError > ( err ? , res ? ) : void Type Parameters TError extends Error = FastifyError Returns void Returns void Defined in node_modules/fastify/types/hooks.d.ts:96
preParsingis the second hook to be executed in the request lifecycle. The previous hook wasonRequest, the next hook will bepreValidation. Notice: in thepreParsinghook, request.body will always be null, because the body parsing happens before thepreHandlerhook.