nock response headers missing on Node.js 19.1

node v18.11.0
version: 1.0.0
endpointsharetweet
This is a minimal reproduction of the issue that response headers are missing from nock responses on Node.js 19.1
const https = require('https'); const nock = require('nock'); // From "Specifying Reply Headers" example in README.md // https://github.com/nock/nock#specifying-reply-headers nock('https://api.github.com') .get('/repos/atom/atom/license') .reply(200, { license: 'MIT' }, { 'X-RateLimit-Remaining': 4999 }); https.get('https://api.github.com/repos/atom/atom/license', (res) => { console.log('Response headers:', res.headers); });
Loading…

no comments

    sign in to comment