Skip to content

Commit 6c404f1

Browse files
committed
Spread headers
1 parent 99446c7 commit 6c404f1

File tree

1 file changed

+5
-2
lines changed
  • packages/node/src/transports

1 file changed

+5
-2
lines changed

packages/node/src/transports/http.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,11 @@ function createRequestExecutor(
106106
let bodyStream = streamFromBody(request.body);
107107

108108
if (request.body.length > GZIP_THRESHOLD) {
109-
options.headers = options.headers || {};
110-
options.headers['Content-Encoding'] = 'gzip';
109+
options.headers = {
110+
...options.headers,
111+
'content-encoding': 'gzip',
112+
};
113+
111114
bodyStream = bodyStream.pipe(createGzip());
112115
}
113116

0 commit comments

Comments
 (0)