Closed
Description
Many websites have started to enable HTTP 2.0 with fallback to HTTP 1.1 (CloudFlare started enabling this too).
And, Nodejs' HTTP requests seem to fail on such websites without an error. No statusCodes or body returned.
That is pretty important considering the increase in HTTP 2.0 enabled websites.
Do anyone know a workaround for getting the response of HTTP requests sent to "HTTP 2.0 enabled with HTTP 1.1 fallback websites"?
As an example:
var request = require('request');
request('https://www.tunetheweb.com', {
headers: {
'User-Agent': 'request'
}
}, function (error, response, body) {
if (error) {
console.error(error);
} else {
console.log(response.statusCode);
}
})