HTTP Clients with Promise Support for Node.js


Summary of my bookmarked Github repositories from Jul 19th, 2016

Github repositories

  • request/request-promise

    Request-Promise is a simplified HTTP request client with Promise support. It adds a Bluebird-powered `.then(...)` method to Request call objects. By default, non-2xx HTTP response codes will cause the promise to be rejected, but this can be overwritten. The package is deprecated as of February 11th, 2020, and alternative libraries are recommended. There are migration guides available for moving from v2 to v3 and from v3 to v4. The module can be installed via npm, and it provides various methods for making HTTP requests, parsing HTML, working with JSON REST APIs, and more.

  • node-fetch/node-fetch

    node-fetch is a module that provides a window.fetch compatible API on the Node.js runtime. It allows you to make HTTP(S) requests and supports features such as consistent behavior with window.fetch API, native promises and async functions, native Node streams for request and response bodies, proper decoding of content encoding (gzip/deflate/brotli), and useful extensions like redirect limit and response size limit. The module can be installed using npm or yarn and requires at least Node.js 12.20.0 for the current stable release (3.x). It offers various options and methods for common usage scenarios, such as fetching plain text or HTML, JSON data, and handling exceptions and errors. Advanced usage includes working with streams, accessing headers and metadata, handling cookies, and more.