UNPKG

@halsp/http

Version:

支持 Halsp HTTP 请求

17 lines (16 loc) 568 B
import { StatusCodes } from "http-status-codes"; import { HeaderHandler } from "../context/header-handler"; import { ExceptionMessage, HalspException } from "@halsp/core"; import { HeadersDict } from "../types"; export declare class HttpException extends HalspException { #private; readonly status: StatusCodes; constructor(status: StatusCodes, error?: string | ExceptionMessage); get headers(): HeadersDict; toPlainObject(): { status: StatusCodes; message: string; }; } export interface HttpException extends HeaderHandler { }