IHttpResHelpers: {
    fromWebRes(res: Response): IHttpRes;
    html(content: string): IHttpRes;
    json<TData>(
        content: TData,
        schema?: StandardSchemaV1<unknown, TData>,
    ): IHttpRes;
    notFound(): IHttpRes;
    permanentRedirect(url: string): IHttpRes;
    redirect(url: string): IHttpRes;
    text(content: string): IHttpRes;
}

Helper methods for creating common IHttpRes instances.

Provides convenience factories for JSON, HTML, plain text, redirect, and 404 responses, as well as a method to wrap an existing Web API Response into an IHttpRes builder.

These methods are available directly on the handler and middleware arguments via HttpHandlerArgs (which extends this type). You typically call them as json(...), redirect(...), etc. from within a handler or middleware function.

IMPORT_PATH: "@daiso-tech/core/http-router/contracts"

Type declaration