2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-17 19:21:29 +03:00

Adding option to disable automatic decompression (#2661)

* Adding ability to disable auto decompression

* Updating decompress documentation in README

* Fixing test\unit\adapters\http.js lint errors

* Adding test for disabling auto decompression

* Removing changes that fixed lint errors in tests

* Removing formating change to unit test

Co-authored-by: Xianming Zhong <chinesedfan@qq.com>
This commit is contained in:
Spencer von der Ohe
2020-03-06 07:01:58 -07:00
committed by GitHub
parent 6642ca9aa1
commit 42eb9dfabc
4 changed files with 45 additions and 12 deletions
+8 -1
View File
@@ -410,7 +410,14 @@ These are the available config options for making requests. Only the `url` is re
// `cancelToken` specifies a cancel token that can be used to cancel the request
// (see Cancellation section below for details)
cancelToken: new CancelToken(function (cancel) {
})
}),
// `decompress` indicates whether or not the response body should be decompressed
// automatically. If set to `true` will also remove the 'content-encoding' header
// from the responses objects of all decompressed responses
// - Node only (XHR cannot turn off decompression)
decompress: true // default
}
```