v2.4.1
·
12 commits
to main
since this release
Release Notes
Added
- Added
Headers.getSetCookie()to return rawSet-Cookieresponse header values as an array, matching modern Node/undici-style fetch behavior.
const cookies = response.headers.getSetCookie();
// ["session=abc123; Path=/", "csrf=token123; Path=/"]Fixed
- Fixed duplicate response headers being dropped by the native transport. Response headers are now passed from the native layer as ordered
[name, value]tuples instead of a plain object, so repeated headers are preserved. response.headers.get(name)now returns comma-joined values for repeated headers, matching fetch behavior.
response.headers.get('x-dupe');
// "one, two"response.headers.get('set-cookie')now preserves all receivedSet-Cookievalues in the joined header view, whileresponse.headers.getSetCookie()andresponse.wreq.setCookiesexpose the raw cookie header array.Response.clone()now preserves duplicate response headers instead of collapsing them through object conversion.
Tests
- Added coverage for repeated response headers, repeated
Set-Cookieheaders,Headers.getSetCookie(), and cloned responses.