Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
General purpose HTTP / HTTPS client for node.js. Supports transparent gzip / deflate decoding. Successor of http-get.
JavaScript

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
ca-bundle
lib
tests
tools
.gitignore
.npmignore
CHANGELOG.md
LICENSE.md
Makefile
README.md
package.json

README.md

About

Simple to use node.js HTTP / HTTPS client for fetching remote resources. Supports transparent gzip / deflate decoding.

The client sends GET requests for fetching the remote objects. You may send HEAD requests if you just need to check the availability of a remote resource. The error reporting is implemented with care. The module itself is used in production for background data processing of thousands of remote resources, therefore it is not your average HTTP / HTTPS node.js client. It is in use for both of the transfer modes: buffered responses or streamed to the disk responses. Most of the decisions that made their way into the http-get are based onto the experience of working with a large URL database where a lot of things can go wrong.

Installation

Either manually clone this repository into your node_modules directory, or the recommended method:

npm install http-get

Usage mode

System Requirements

  • node.js v0.6.11+ for general usage. Previous versions are broken. Invalid domain names hang the event loop #2688.
  • node.js v0.6.18+ with zlib bindings for using the transparent gzip / deflate decompression. Previous versions are broken. They don't have proper error reporting #3230. node.js v0.6.11 - v0.6.17 may be used, but options.nocompress is forced as true.

This library is not recommended under node.js v0.6.17 due to this issue.

node.js v0.4 is NOT supported due to lack of zlib bindings. node.js v0.4 is only supported by the http-get v0.3 versions.

Contributors

  • cmtt - options.timeout, fixed the broken handling of buffered response when retrying the request with options.nocompress
  • elarcent - HTTP Basic auth fix
Something went wrong with that request. Please try again.