<commit_before># got-xhr

[![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges)

A tiny HTTP client for Node/Browser. Uses [got](https://www.npmjs.com/package/got) in Node and [xhr](https://www.npmjs.com/package/xhr) in the browser.

## Install

```sh
npm install got-xhr --save
```

## Example

```js
var request = require('got-xhr')
request('http://foo.com/some/api', {
  method: 'PUT',
  json: true,
  query: {
    sort: 'name'
  }
}, function (err, data) {
  if (err) throw err
  console.log("Got JSON result: ", data)
})
```

The body response defaults to text unless `json` or `responseType` options are specified.

## Motivation
<commit_msg>updating readme<commit_after># got-xhr

[![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges)

## experimental

this is mostly an experiment, and will probably be dropped in favour of an existing module like `whatwg-fetch` or `superagent`

--

A tiny HTTP client for Node/Browser. Uses [got](https://www.npmjs.com/package/got) in Node and [xhr](https://www.npmjs.com/package/xhr) in the browser.

## Install

```sh
npm install got-xhr --save
```

## Example

```js
var request = require('got-xhr')
request('http://foo.com/some/api', {
  method: 'PUT',
  json: true,
  query: {
    sort: 'name'
  }
}, function (err, data) {
  if (err) throw err
  console.log("Got JSON result: ", data)
})
```

The body response defaults to text unless `json` or `responseType` options are specified.

## Motivation

{'fraction_non_alphanumeric': 0.16996805111821087, 'fraction_numerical': 0.0, 'mean_word_length': 4.003194888178914, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4054466', 'n_tokens_mistral': 563, 'n_tokens_neox': 537, 'n_words': 146}