From c3b37cf849a5326df24cfd70643d5c58cd0cba88 Mon Sep 17 00:00:00 2001 From: Austin Sasko Date: Mon, 14 Mar 2022 14:59:24 -0400 Subject: [PATCH] feat: Add support for #143 - add flag to pipeResponseToFile Adding a flag that will skip the gzip decode step --- dist/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/index.js b/dist/index.js index 371b19e..10b3830 100644 --- a/dist/index.js +++ b/dist/index.js @@ -7299,10 +7299,10 @@ class DownloadHttpClient { * @param destinationStream the stream where the file should be written to * @param isGzip a boolean denoting if the content is compressed using gzip and if we need to decode it */ - pipeResponseToFile(response, destinationStream, isGzip) { + pipeResponseToFile(response, destinationStream, isGzip, forceGzip) { return __awaiter(this, void 0, void 0, function* () { yield new Promise((resolve, reject) => { - if (isGzip) { + if (isGzip && !forceGzip) { const gunzip = zlib.createGunzip(); response.message .on('error', error => { @@ -8021,4 +8021,4 @@ module.exports = __webpack_require__(141); /***/ }) -/******/ }); \ No newline at end of file +/******/ });