<commit_before>### Immutable-http

[![npm version](https://badge.fury.io/js/immutable-http.svg)](http://badge.fury.io/js/immutable-http)

Http client with pretty simple chaining API

#### Usage

```
var result = new Http().withUrl('http://any_api.com/:id')
                        .withMethod('GET')
                        .withHeader('Content-Type','application/json')
                        .withBody({some:data})
                        .withResponseType('json')
                        .withDynamicSegment('id',123)
                        .withParam('filter','some_filter') // Adds query section to the url like '?filter=some_filter'
                        .exec();
```

```
result = Promise({
  status: int,
  response: [obj|string],
  headers: string
}, {
  status: int,
  response: [obj|string],
  headers: string
})
```

Response type options could be obtained from XMLHttp [specs](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest)

#### Build

```
npm run dist
```

#### Tests
Run
```
node server
```

then
```
npm test
```
<commit_msg>Readme update<commit_after>### Immutable-http

[![npm version](https://badge.fury.io/js/immutable-http.svg)](http://badge.fury.io/js/immutable-http)

Http client with pretty simple chaining API

#### Usage

```
var result = new Http().url('http://any_api.com/:id')
                        .method('GET')
                        .header('Content-Type','application/json')
                        .body({some:data})
                        .responseType('json')
                        .segment('id',123)
                        .query('filter','some_filter') // Adds query section for the url like '?filter=some_filter'
                        .exec();
```

```
result = Promise({
  status: int,
  response: [obj|string],
  headers: string
}, {
  status: int,
  response: [obj|string],
  headers: string
})
```

Response type options could be obtained from XMLHttp [specs](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest)

#### Build

```
npm run dist
```

#### Tests
Run
```
node server
```

then
```
npm test
```

{'fraction_non_alphanumeric': 0.17000955109837632, 'fraction_numerical': 0.0028653295128939827, 'mean_word_length': 2.304416403785489, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, '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': '2382308', 'n_tokens_mistral': 667, 'n_tokens_neox': 620, 'n_words': 131}