Skip to content

Instantly share code, notes, and snippets.

@gireeshpunathil
Last active August 24, 2023 07:23
Show Gist options
  • Save gireeshpunathil/d3c4b15f5a9dcea39979295f520484e3 to your computer and use it in GitHub Desktop.
Save gireeshpunathil/d3c4b15f5a9dcea39979295f520484e3 to your computer and use it in GitHub Desktop.
simulated program for pollset_query failure (4083)
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()
This file has been truncated, but you can view the full file.
View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment