Skip to content

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

Closed

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

Activity

  1. added
    http
    on Dec 17, 2015
  2. Fishrock123 commented on Dec 17, 2015

    @Fishrock123
    Contributor

    cc @nodejs/http

  3. tunetheweb commented on Dec 17, 2015

    @tunetheweb

    Note this is a duplicate of #4334 as was working with umutm on this and we both posted at same time. Happy to close one or the other as no point keeping both open.

  4. added
    duplicate
    on Dec 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicatehttp

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions