I need to get the Content-Length and Content-Type headers of large files with Node.
Content-Length
Content-Type
Unfortunately, the server I\'m dealing with do
method: 'HEAD'
http.request('http://example.com', { method: 'HEAD', }, res => { console.log(res.statusCode, res.statusMessage) console.log(res.headers) res.on('data', _ => { console.log(`IT SHOULDN'T REACH HERE!`) }) }).on('error', console.error) .end()