<commit_before># RAIL Plugins

## buffer
Buffers the response body and exports it as `response.buffer`.

**options**

  - `{boolean} default` enable buffering for all requests, defaults to `false`
  - `{number} max` max buffer size, defaults to `134217728` (128 MiB)

**request options**

  - `{boolean} buffer` en-/disable buffering

### buffer.intercept(call)
Manually intercept (buffer the response body). To be used by other plugins.

## cookies
Get/Set cookies. Received cookies are exported as `response.cookies`.

**options**

  - `{Object} jar` the cookie jar to use, defaults to `{}`

## json
Parse response body. Parsed body is exported as `response.json`.

**options**

  - `{boolean} auto` enable auto-parsing when `Content-Type: application/json`

**request options**

  - `{boolean} json` enable json parsing

## redirect

**options**

  - `{number} limit` max number of redirects, defaults to `1`
  - `{Array} codes` codes to react on, defaults to `[301, 302, 308]`
  - `{boolean} sameHost` only allow redirects to the current host, defaults to `false`
  - `{boolean} allowUpgrade` allow switch from `http` to `https`, defaults to `true`
  - `{boolean} allowDowngrade` allow switch from `https` to `http`, defaults to `false`

**request options**

  - `{Object} redirect`
    - `{number} limit` see `options`<commit_msg>doc: add missing redirect request options<commit_after># RAIL Plugins

## buffer
Buffers the response body and exports it as `response.buffer`.

**options**

  - `{boolean} default` enable buffering for all requests, defaults to `false`
  - `{number} max` max buffer size, defaults to `134217728` (128 MiB)

**request options**

  - `{boolean} buffer` en-/disable buffering

### buffer.intercept(call)
Manually intercept (buffer the response body). To be used by other plugins.

## cookies
Get/Set cookies. Received cookies are exported as `response.cookies`.

**options**

  - `{Object} jar` the cookie jar to use, defaults to `{}`

## json
Parse response body. Parsed body is exported as `response.json`.

**options**

  - `{boolean} auto` enable auto-parsing when `Content-Type: application/json`

**request options**

  - `{boolean} json` enable json parsing

## redirect

**options**

  - `{Array} codes` codes to react on, defaults to `[301, 302, 308]`
  - `{number} limit` max number of redirects, defaults to `1`
  - `{boolean} sameHost` only allow redirects to the current host, defaults to `false`
  - `{boolean} allowUpgrade` allow switch from `http` to `https`, defaults to `true`
  - `{boolean} allowDowngrade` allow switch from `https` to `http`, defaults to `false`

**request options**

  - `{Object} redirect`
    - `{number} limit` see `options`
    - `{boolean} sameHost` see `options`
    - `{boolean} allowUpgrade` see `options`
    - `{boolean} allowDowngrade` see `options`
{'fraction_non_alphanumeric': 0.13493465206640762, 'fraction_numerical': 0.015542211232779936, 'mean_word_length': 4.1678832116788325, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '5482958', 'n_tokens_mistral': 911, 'n_tokens_neox': 858, 'n_words': 338}