From dc03c5991fd97a8a3aecb8306475311b13742c58 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Fri, 22 Nov 2024 20:13:13 +0900 Subject: [PATCH] `HttpMigrateRouteFetcher`'s `method.toUpperCase()`. --- package.json | 2 +- src/http/HttpMigrateRouteFetcher.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index de8e05c..8a80d77 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@samchon/openapi", - "version": "1.2.3", + "version": "1.2.4", "description": "OpenAPI definitions and converters for 'typia' and 'nestia'.", "main": "./lib/index.js", "module": "./lib/index.mjs", diff --git a/src/http/HttpMigrateRouteFetcher.ts b/src/http/HttpMigrateRouteFetcher.ts index c97072d..c557801 100644 --- a/src/http/HttpMigrateRouteFetcher.ts +++ b/src/http/HttpMigrateRouteFetcher.ts @@ -58,7 +58,7 @@ const _Propagate = async ( }; const init: RequestInit = { ...(props.connection.options ?? {}), - method: props.route.method, + method: props.route.method.toUpperCase(), headers: (() => { const output: [string, string][] = []; for (const [key, value] of Object.entries(headers)) @@ -98,7 +98,7 @@ const _Propagate = async ( if (status === 200 || status === 201) { // SUCCESS CASE - if (props.route.method === "head") return out(undefined); + if (props.route.method.toUpperCase() === "HEAD") return out(undefined); else if ( props.route.success === null || props.route.success.type === "text/plain"