Clone and edit this document
Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
nock response headers missing on Node.js 19.1
node v18.11.0
version:
1.0.0
endpoint
share
tweet
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