From 8634a1d07d2ae594b77123e31f74d109f694c705 Mon Sep 17 00:00:00 2001 From: HiiiiD Date: Tue, 15 Nov 2022 11:14:23 +0100 Subject: [PATCH] Use lowercase headers --- src/load.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/load.ts b/src/load.ts index 757860bab..2c075e723 100644 --- a/src/load.ts +++ b/src/load.ts @@ -131,9 +131,9 @@ export default async function load( } } const res = await request(schema, { method: (options.httpMethod as Dispatcher.HttpMethod) || "GET", headers }); - const contentType = Array.isArray(res.headers["Content-Type"]) - ? res.headers["Content-Type"][0] - : res.headers["Content-Type"]; + const contentType = Array.isArray(res.headers["content-type"]) + ? res.headers["content-type"][0] + : res.headers["content-type"]; if (ext === ".json" || (contentType && contentType.includes("json"))) { options.schemas[schemaID] = { hint,