update Accept-Encoding header to include Brotli compression

This commit is contained in:
Flummi 2025-03-18 13:14:32 +01:00
parent c395eef497
commit 68f345d396
2 changed files with 2 additions and 2 deletions

2
dist/index.js vendored
View File

@ -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) => {

View File

@ -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"
} }
}; };