Skip to content

bimalkant-lauhny/request-http2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

request-http2

Request module with HTTP/2 support

This project is a modified fork of request project. Therefore see request for details.

HTTP/2 requests

Unlike request package, it supports HTTP/2 requests. Just add http: true in the options object argument in request method.

For example, see POST request below -

  var options = {
    method: 'POST',
      uri: 'https://someurl.com/path',
      http2: true,
      headers: {
        // HEADERS go here
      },
      body: {
        // DATA to be posted
      } ,
      json: true
  };

  request(options, function (error, response, body) {
    if (error) {
      return console.error('upload failed:', error);
    }
    console.log('Server responded with:', body);
  })

About

Request module with HTTP/2 support

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published