Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions packages/bun-types/globals.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1888,6 +1888,25 @@ interface BunFetchRequestInit extends RequestInit {
* ```
*/
unix?: string;

/**
* Control automatic decompression of the response body.
* When set to `false`, the response body will not be automatically decompressed,
* and the `Content-Encoding` header will be preserved. This can improve performance
* when you need to handle compressed data manually or forward it as-is.
* This is a custom property that is not part of the Fetch API specification.
*
* @default true
* @example
* ```js
* // Disable automatic decompression for a proxy server
* const response = await fetch("https://example.com/api", {
* decompress: false
* });
* // response.headers.get('content-encoding') might be 'gzip' or 'br'
* ```
*/
decompress?: boolean;
}

/**
Expand Down
Loading