<commit_before># httpinvoke

httpinvoke is a 4.8kb no-dependencies HTTP client library for **browsers** and **Node.js** with a **promise**-based or Node.js-style callback-based API to **progress events**, text and **binary** file **upload** and **download**, partial response body, request and response headers, status code.

[![Build Status](https://travis-ci.org/jakutis/httpinvoke.png?branch=master)](https://travis-ci.org/jakutis/httpinvoke)

- [Ask a question](https://news.ycombinator.com/item?id=6498905)
- [Overview](#overview)
- [Installation](#installation)
- [Examples](#examples)
  - [Basic](#basic)
  - [Basic with Promises](#basic-with-promises)
  - [Promises and partial progress](#promises-and-partial-progress)
  - [Downloading and uploading a file](#downloading-and-uploading-a-file)
  - [Uploading an HTML form](#uploading-an-html-form)
  - [Streaming JSON](#streaming-json)
- [API](#api)
  - [options](#options)
  - [callback sequence](#callback-sequence)
  - [feature flags](#feature-flags)
  - [error conditions](#error-conditions)
  - [error codes](#error-codes)
- [Development](#development)

## Overview

* Gracefully upgrades to latest platform-specific features:
  * [cross-origin resource sharing](http://www.w3.org/TR/cors/) - do cross-domain requests with confidence;
  * [streaming](http://www.w3.org/TR/streams-api/) - currently only streaming downloads, see [description of option **partialOutputMode** below](#options).
  * [progress events](http://www.w3.org/TR/progress-events/) - get current and total bytes downloaded or uploaded;
  * [binary file uploads and downloads](http://www.w3.org/TR/XMLHttpRequest/) - easily use Blob, FormData, ArrayBuffer, Uint8Array or a simple array of bytes;<commit_msg>README.markdown: update description<commit_after># httpinvoke

A 4.8kb no-dependencies HTTP client library for browsers and Node.js with a promise-based or Node.js-style callback-based API to progress events, text and binary file upload and download, partial response body, request and response headers, status code.

[![Build Status](https://travis-ci.org/jakutis/httpinvoke.png?branch=master)](https://travis-ci.org/jakutis/httpinvoke)

- [Ask a question](https://news.ycombinator.com/item?id=6498905)
- [Overview](#overview)
- [Installation](#installation)
- [Examples](#examples)
  - [Basic](#basic)
  - [Basic with Promises](#basic-with-promises)
  - [Promises and partial progress](#promises-and-partial-progress)
  - [Downloading and uploading a file](#downloading-and-uploading-a-file)
  - [Uploading an HTML form](#uploading-an-html-form)
  - [Streaming JSON](#streaming-json)
- [API](#api)
  - [options](#options)
  - [callback sequence](#callback-sequence)
  - [feature flags](#feature-flags)
  - [error conditions](#error-conditions)
  - [error codes](#error-codes)
- [Development](#development)

## Overview

* Gracefully upgrades to latest platform-specific features:
  * [cross-origin resource sharing](http://www.w3.org/TR/cors/) - do cross-domain requests with confidence;
  * [streaming](http://www.w3.org/TR/streams-api/) - currently only streaming downloads, see [description of option **partialOutputMode** below](#options).
  * [progress events](http://www.w3.org/TR/progress-events/) - get current and total bytes downloaded or uploaded;
  * [binary file uploads and downloads](http://www.w3.org/TR/XMLHttpRequest/) - easily use Blob, FormData, ArrayBuffer, Uint8Array or a simple array of bytes;
{'fraction_non_alphanumeric': 0.1532677848467322, 'fraction_numerical': 0.008097165991902834, 'mean_word_length': 4.943298969072165, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7609957', 'n_tokens_mistral': 1115, 'n_tokens_neox': 1033, 'n_words': 261}