• Parse the body of a h3 event.

    Cookies are part of the HTTP standard and may be send with a request.

    Type Parameters

    Type Parameters

    • ZodSchema extends ZodType<any, any, any, ZodSchema>

    Parameters

    • event: CompatibilityEvent

      Input to parse using the passed schema

    • schema: ZodSchema

      Error code of error if parsing fails

    • Optional errorCode: number = 422

      Optional error message if parsing fails

    • Optional errorMessage: string = "Body parsing failed"

    Returns Promise<TypeOf<ZodSchema>>

Generated using TypeDoc