/** * Utilities for creating replies * @packageDocumentation */ /// import { OutgoingHttpHeaders } from "http"; import { Reply } from "."; /** * Creates a [[`Reply`]] with the given raw body * * @param body - Raw body * @param status - Status code * @param headers - Headers */ export declare function raw(body: Buffer | string, status?: number, headers?: OutgoingHttpHeaders): [Reply]; /** * Creates a [[`Reply`]] with the given text body * * @param body - Text body * @param status - Status code * @param headers - Headers */ export declare function text(body: string, status?: number, headers?: OutgoingHttpHeaders): [Reply]; /** * Creates a [[`Reply`]] with its body set to the provided object serialised to JSON * * @param body - Serialisable object * @param status - Status code * @param headers - Headers * @param space - Number of spaces to indent the serialised JSON with (unindented by default) */ export declare function json(body: unknown, status?: number, headers?: OutgoingHttpHeaders, space?: number): [Reply]; /** * Creates a [[`Reply`]] with the given HTML body * * @param body - HTML body * @param status - Status code * @param headers - Headers */ export declare function html(body: string, status?: number, headers?: OutgoingHttpHeaders): [Reply]; /** * Creates a [[`Reply`]] with the given status code, * with its body set to the default message for that code * * @param status - Status code * @param headers - Headers */ export declare function status(status: number, headers?: OutgoingHttpHeaders): [Reply];