From 452be0cecf9ba6dda3fad93098a224f5855afdd0 Mon Sep 17 00:00:00 2001 From: HorizonCode Date: Fri, 12 May 2023 13:57:13 +0200 Subject: [PATCH] export HTTPMethod --- mod.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod.ts b/mod.ts index 8010199..0c7252a 100644 --- a/mod.ts +++ b/mod.ts @@ -12,7 +12,7 @@ type ListenOptions = { staticServePath?: string; }; -enum HTTPMethod { +export enum HTTPMethod { GET = "GET", POST = "POST", PUSH = "PUSH", @@ -289,7 +289,7 @@ export class HTTPServer { this.add(HTTPMethod.DELETE, path, handler); } - private add(method: HTTPMethod, path: string, handler: RouteHandler) { + add(method: HTTPMethod, path: string, handler: RouteHandler) { const route = new Route(path, method, handler); if (this.routes.has(route.routeName)) { console.log(`${route.routeName} already registered!`);