From f5d94faa826057f8a9491f78c761dc1e5667e951 Mon Sep 17 00:00:00 2001 From: murisceman Date: Wed, 16 Aug 2023 17:03:14 +0200 Subject: [PATCH] fix: always uppercase `method` option (#259) --- src/fetch.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/fetch.ts b/src/fetch.ts index 534dcca8..84ea1f70 100644 --- a/src/fetch.ts +++ b/src/fetch.ts @@ -142,6 +142,9 @@ export function createFetch(globalOptions: CreateFetchOptions): $Fetch { error: undefined, }; + // Uppercase method name + context.options.method = context.options.method?.toUpperCase(); + if (context.options.onRequest) { await context.options.onRequest(context); }