We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d520ef commit 2db432aCopy full SHA for 2db432a
packages/http/src/model.ts
@@ -313,12 +313,14 @@ export class RequestBuilder {
313
}
314
315
headers(headers: { [name: string]: string }): this {
316
- this._headers = headers;
+ this._headers = Object.fromEntries(
317
+ Object.entries(headers).map(([key, value]) => [key.toLowerCase(), value])
318
+ );
319
return this;
320
321
322
header(name: string, value: string | number): this {
- this._headers[name] = String(value);
323
+ this._headers[name.toLowerCase()] = String(value);
324
325
326
@@ -557,4 +559,4 @@ export class MemoryHttpResponse extends HttpResponse {
557
559
this.emit('close');
558
560
561
-}
562
+}
0 commit comments