Skip to content

Commit

Permalink
Set Default Encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Aug 30, 2023
1 parent bce1dc3 commit a000ca8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@

## Version History

### v4.2.0

- :bug: Use `gzip` Encoding by default

### v4.1.1

- :bug: Fix JS build
Expand Down
1 change: 1 addition & 0 deletions dist/lib/fetch.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/lib/fetch.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions lib/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ export default async function Fetch(
if (opts.headers) Object.assign(opts.headers, config.headers);

const headers: HeadersInit = new Headers();
headers.set('Accept-Encoding', 'gzip');

for (const header in opts.headers) {
headers.set(header, opts.headers[header]);
}
Expand Down

0 comments on commit a000ca8

Please sign in to comment.