From d1d4e03885fc1cb8d927698999ceb17427d70de6 Mon Sep 17 00:00:00 2001 From: Michael Wolf Date: Fri, 7 Mar 2025 20:25:13 -0600 Subject: [PATCH] Use caps for http method types --- deno/types.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/deno/types.ts b/deno/types.ts index c139deb..2768484 100644 --- a/deno/types.ts +++ b/deno/types.ts @@ -8,17 +8,17 @@ import { HttpCode, httpCodes } from "./http-codes.ts"; import { ContentType, contentTypes } from "./content-types.ts"; const methodParser = z.union([ - z.literal("get"), - z.literal("post"), - z.literal("put"), - z.literal("patch"), - z.literal("delete"), + z.literal("GET"), + z.literal("POST"), + z.literal("PUT"), + z.literal("PATCH"), + z.literal("DELETE"), ]); export type Method = z.infer; const massageMethod = (input: string): Method => { - const r = methodParser.parse(input.toLowerCase()) + const r = methodParser.parse(input.toUpperCase()) return r; };