UNPKG

@halsp/http

Version:

支持 Halsp HTTP 请求

26 lines (23 loc) 536 B
import { Middleware } from "@halsp/core"; import { HeaderHandler, initHeaderHandler, initResultHandler, ResultHandler, } from "./context"; declare module "@halsp/core" { // eslint-disable-next-line @typescript-eslint/no-empty-interface interface Middleware extends ResultHandler, HeaderHandler {} } initResultHandler(Middleware.prototype, function () { return this.res; }); initHeaderHandler( Middleware.prototype, function () { return this.req.headers; }, function () { return this.res.headers; }, );