update Accept-Encoding header to include Brotli compression
This commit is contained in:
2
dist/index.js
vendored
2
dist/index.js
vendored
@@ -48,7 +48,7 @@ export default async (urlString, options = {}) => {
|
|||||||
headers: {
|
headers: {
|
||||||
...options.headers,
|
...options.headers,
|
||||||
...(body ? { "Content-Length": Buffer.byteLength(body) } : {}),
|
...(body ? { "Content-Length": Buffer.byteLength(body) } : {}),
|
||||||
"Accept-Encoding": "gzip, deflate"
|
"Accept-Encoding": "br, gzip, deflate"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
@@ -78,7 +78,7 @@ export default async (
|
|||||||
headers: {
|
headers: {
|
||||||
...options.headers,
|
...options.headers,
|
||||||
...(body ? { "Content-Length": Buffer.byteLength(body) } : {}),
|
...(body ? { "Content-Length": Buffer.byteLength(body) } : {}),
|
||||||
"Accept-Encoding": "gzip, deflate"
|
"Accept-Encoding": "br, gzip, deflate"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user