From f2645df6b277cdafdaf036e3edb0cbd6773a4b50 Mon Sep 17 00:00:00 2001 From: Nick Pezza Date: Wed, 7 Feb 2024 12:07:54 -0500 Subject: [PATCH] Ensure fetch method is always uppercase --- src/http/fetch_request.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/http/fetch_request.js b/src/http/fetch_request.js index f4ff5adbe..f39fd8101 100644 --- a/src/http/fetch_request.js +++ b/src/http/fetch_request.js @@ -56,7 +56,7 @@ export class FetchRequest { this.fetchOptions = { credentials: "same-origin", redirect: "follow", - method: method, + method: method.toUpperCase(), headers: { ...this.defaultHeaders }, body: body, signal: this.abortSignal, @@ -79,7 +79,7 @@ export class FetchRequest { this.url = url this.fetchOptions.body = body - this.fetchOptions.method = fetchMethod + this.fetchOptions.method = fetchMethod.toUpperCase() } get headers() {