feat: add transport features (mTLS, DNS, multipart, zstd, charset)#5
Merged
StopMakingThatBigFace merged 3 commits intomainfrom Apr 15, 2026
Merged
feat: add transport features (mTLS, DNS, multipart, zstd, charset)#5StopMakingThatBigFace merged 3 commits intomainfrom
StopMakingThatBigFace merged 3 commits intomainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release Notes
Breaking Changes
The minimum supported Node.js version is now
20+.The package now officially requires Node 20, which aligns
engineswith the library's actual runtime and public API surface, includingFormData,File,Request,Response, and related web globals.The
keepOriginalHeaderNamesoption has been removed.There is no separate flag for original header-name preservation anymore. Header tuples are now the single low-level way to control wire shape:
Proxy behavior has changed.
When
proxyis not provided, the client may now honor environment/system proxy settings such asHTTP_PROXY,HTTPS_PROXY,ALL_PROXY, andNO_PROXYthrough the nativewreqtransport path.To explicitly disable env/system proxy detection for a request, use:
proxy: falseAdded
mTLS / client certificate support
Added support for client certificate authentication in both HTTP and WebSocket flows:
tlsIdentity: { cert, key }for PEMtlsIdentity: { pfx, passphrase }for PKCS#12 / PFXCustom CA / trust store support
Added custom trust store configuration:
ca: { cert, includeDefaultRoots }You can provide a single certificate or an array of certificates.
DNS controls
Added DNS options:
dns.serversfor custom DNS serversdns.hostsfor per-host IP overridesMultipart uploads via
FormDataRequest bodies now support
FormDatanatively, with fetch-like behavior:content-typeis generated automaticallyTransparent
zstddecompressionWith
compress: true, the client now supportszstdresponse decoding in addition togzip,br, anddeflate.Charset-aware
response.text()response.text()now decodes response bodies using thecharsetdeclared inContent-Typeinstead of always assuming UTF-8.New exported types
The package now exports:
TlsIdentityCertificateAuthorityDnsOptionsNativeDnsOptionsChanged
Header tuples are now the single low-level header control mechanism.
If you pass:
the client will preserve both tuple order and the original header names on the wire without any additional option.
Request body dispatch is now binary-safe internally.
Native request bodies are now passed as bytes instead of UTF-8 strings, which improves correctness for multipart payloads and other non-text request bodies.
Request cloning and redirect handling now work correctly with multipart bodies.
Internal request cloning and redirect rewriting now support both raw byte bodies and multipart request bodies.
Documentation
The README has been expanded to cover:
FormDatauploadsproxy: falsedisableDefaultHeaderszstdTesting
Added integration coverage for:
zstddecompressionproxy: falseUpgrade Guide
If you are upgrading from a previous version:
keepOriginalHeaderNames.proxy: false.headers.