<commit_before># get

`get` is a slightly higher-level HTTP client for nodejs.

## Installation

    npm install get

get has no dependencies.

## Features

* Redirect following.
* Convenience functions for downloading and getting data as string.
* Binary-extension and basic binary detection.
* Configurable headers

## API

Downloads are objects in `get`.

    var dl = new get({ uri: 'http://google.com/' });

The get constructor can also take a plain string if you don't want to give options.

    var dl = new get('http://google.com/');

It can also take other options.

    var dl = new get({
        uri: 'http://google.com/',
        max_redirs: 20,
    });

Then it exposes two big methods

    dl.asString(function(err, str) {
        console.log(str);<commit_msg>Noting optional dependencies.<commit_after># get

`get` is a slightly higher-level HTTP client for nodejs.

## Installation

    npm install get

get has no dependencies.

For testing, you'll need make and [expresso](https://github.com/visionmedia/expresso).

For docs you'll need [docco](https://github.com/jashkenas/docco).

## Features

* Redirect following.
* Convenience functions for downloading and getting data as string.
* Binary-extension and basic binary detection.
* Configurable headers

## API

Downloads are objects in `get`.

    var dl = new get({ uri: 'http://google.com/' });

The get constructor can also take a plain string if you don't want to give options.

    var dl = new get('http://google.com/');

It can also take other options.

    var dl = new get({
        uri: 'http://google.com/',
        max_redirs: 20,
    });

Then it exposes two big methods

    dl.asString(function(err, str) {
        console.log(str);
{'fraction_non_alphanumeric': 0.10936591041303083, 'fraction_numerical': 0.002326934264107039, 'mean_word_length': 3.154589371980676, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '844122', 'n_tokens_mistral': 526, 'n_tokens_neox': 498, 'n_words': 199}