Skip to content

Commit 2c3d91e

Browse files
committed
chore: gzip responses using the Accept-Encoding header
1 parent cf59770 commit 2c3d91e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

lib/requestwrapper.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,9 @@ export function sendRequest(parameters, _callback) {
218218
headers = extend(true, {}, headers, multipartForm.getHeaders());
219219
}
220220

221+
// accept gzip encoded responses if Accept-Encoding is not already set
222+
headers['Accept-Encoding'] = headers['Accept-Encoding'] || 'gzip';
223+
221224
const requestParams = {
222225
url,
223226
method,

0 commit comments

Comments
 (0)