Last active
August 24, 2023 07:23
-
-
Save gireeshpunathil/d3c4b15f5a9dcea39979295f520484e3 to your computer and use it in GitHub Desktop.
simulated program for pollset_query failure (4083)
This file contains 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
const h = require('https') | |
const options = { | |
hostname: 'registry.npmjs.org', | |
port: 443, | |
protocol: 'https:', | |
auth: '', | |
method: 'GET', | |
headers: { | |
accept: ['application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*'], | |
'npm-auth-type': [ 'legacy' ], | |
'npm-command': [ 'install' ], | |
'pacote-pkg-id': [ 'registry:n' ], | |
'pacote-req-type': [ 'packument' ], | |
'pacote-version': [ '13.6.2' ], | |
'user-agent': [ 'npm/8.19.3 node/v18.13.0 AIX ppc64 workspaces/false' ], | |
'if-none-match': [ '"56d5fc27db18ba864de7b71e4446f68a"' ], | |
'if-modified-since': [ 'Fri, 21 Jul 2023 15:33:46 GMT' ], | |
connection: [ 'keep-alive' ], | |
'Accept-Encoding': [ 'gzip,deflate' ] | |
}, | |
} | |
options.agent = new h.Agent(options) | |
const q = h.request(options, (r) => { | |
r.on('data', (d) => { | |
console.log(d) | |
}) | |
r.on('end', () => { | |
console.log('done') | |
}) | |
}) | |
q.on('error', (e) => { | |
console.error(e.message) | |
}) | |
q.end() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment