Skip to content

Sending HTTP Requests to HTTP 2.0 Enabled Websites Return No Response #4333

Closed
@umutm

Description

@umutm

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);
  }
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateIssues and PRs that are duplicates of other issues or PRs.httpIssues or PRs related to the http subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions