Skip to content

Commit e335c76

Browse files
authored
Use lowercase headers (openapi-ts#990)
1 parent 863cd5f commit e335c76

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/load.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ export default async function load(
131131
}
132132
}
133133
const res = await request(schema, { method: (options.httpMethod as Dispatcher.HttpMethod) || "GET", headers });
134-
const contentType = Array.isArray(res.headers["Content-Type"])
135-
? res.headers["Content-Type"][0]
136-
: res.headers["Content-Type"];
134+
const contentType = Array.isArray(res.headers["content-type"])
135+
? res.headers["content-type"][0]
136+
: res.headers["content-type"];
137137
if (ext === ".json" || (contentType && contentType.includes("json"))) {
138138
options.schemas[schemaID] = {
139139
hint,

0 commit comments

Comments
 (0)