Describe the bug
When making a fetch request using this library, reading the set-cookie header in the response via Headers.get method doesn't work, unless Headers._map is initialised (via a different reading mechanism.)
To Reproduce Steps to reproduce the behavior:
import {Headers} from '@whatwg-node/node-fetch'
const headers = new Headers({
'set-cookie': ['a=b', 'c=d'],
});
console.log(headers.get('set-cookie'))
headers.getMap();
console.log(headers.get('set-cookie'))
Produces:
Expected behavior
Environment:
- OS: MacOS
@whatwg-node/node-fetch: 0.7.9
- NodeJS: v22.11.0