Skip to content

Commit

Permalink
Downgrade decompress-response
Browse files Browse the repository at this point in the history
  • Loading branch information
szmarczak committed Oct 22, 2021
1 parent 3a84454 commit f6d1fb7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion benchmark/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ suite.add('got - promise', {
}).add('axios - stream', {
defer: true,
fn: async (deferred: {resolve: () => void}) => {
const {data} = await axios.request(axiosStreamOptions);
const result = await axios.request(axiosStreamOptions);
const {data}: any = result;

data.resume();
data.once('end', () => {
deferred.resolve();
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"@types/responselike": "^1.0.0",
"cacheable-lookup": "^6.0.4",
"cacheable-request": "^7.0.2",
"decompress-response": "^7.0.0",
"decompress-response": "^6.0.0",
"form-data-encoder": "^1.6.0",
"get-stream": "^6.0.1",
"http2-wrapper": "^2.1.9",
Expand All @@ -65,7 +65,7 @@
"@types/benchmark": "^2.1.1",
"@types/express": "^4.17.13",
"@types/node": "^16.11.3",
"@types/node-fetch": "^3.0.3",
"@types/node-fetch": "^2.5.12",
"@types/pem": "^1.9.6",
"@types/pify": "^5.0.1",
"@types/readable-stream": "^2.3.11",
Expand Down
2 changes: 1 addition & 1 deletion test/stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ test('proxies `content-encoding` header when `options.decompress` is false', wit
);
});

const {headers} = await got('proxy');
const {headers} = await got('proxy', {decompress: false});
t.is(headers.unicorn, 'rainbow');
t.is(headers['content-encoding'], 'gzip');
});
Expand Down

0 comments on commit f6d1fb7

Please sign in to comment.