From 68f345d396c4b8920fdd9d138034d17b68ae0d2f Mon Sep 17 00:00:00 2001 From: Flummi Date: Tue, 18 Mar 2025 13:14:32 +0100 Subject: [PATCH] update Accept-Encoding header to include Brotli compression --- dist/index.js | 2 +- src/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 7dbf21d..79d5e6c 100644 --- a/dist/index.js +++ b/dist/index.js @@ -48,7 +48,7 @@ export default async (urlString, options = {}) => { headers: { ...options.headers, ...(body ? { "Content-Length": Buffer.byteLength(body) } : {}), - "Accept-Encoding": "gzip, deflate" + "Accept-Encoding": "br, gzip, deflate" } }; return new Promise((resolve, reject) => { diff --git a/src/index.ts b/src/index.ts index d9421f2..9439457 100644 --- a/src/index.ts +++ b/src/index.ts @@ -78,7 +78,7 @@ export default async ( headers: { ...options.headers, ...(body ? { "Content-Length": Buffer.byteLength(body) } : {}), - "Accept-Encoding": "gzip, deflate" + "Accept-Encoding": "br, gzip, deflate" } };