UNPKG

express-allow-methods

Version:

Express middleware for sending HTTP 405 Method Not Allowed response

8 lines (7 loc) 405 B
import type { RequestHandler } from "express"; import type HttpMethod from "./http-method.type"; export { default as HttpMethod } from "./http-method.type"; /** @deprecated Use `HttpMethod` instead */ export declare type NodeHttpMethod = HttpMethod; export { default as ExpressHttpMethod } from "./express-http-method.type"; export default function allowMethods(...methods: HttpMethod[]): RequestHandler;