<commit_before># Specification for Widebullet

Widebullet is RESTful API gateway with JSON-RPC. It accepts a HTTP request based JSON-RPC.

## API

Widebullet has the APIs below.

 * [POST /wbt](#post-wbt)
 * [GET /stat/go](#get-statgo)

### POST /wbt

Accepts a HTTP request based JSON-RPC and proxies each converted HTTP request to a corresponding endpoint.

The JSON below is a request-body example.

```json
[
  {
    "jsonrpc": "2.0",
    "ep": "ep-1",
    "method": "/user/get",
    "params": {
      "user_id": 1
    },
    "id": "1"
  },
  {
    "jsonrpc": "2.0",
    "ep": "ep-1",
    "http_method": "GET",
    "method": "/item/get",
    "params": {
      "item_id": 2
    },
    "id": "2"<commit_msg>doc: changed behavior of forwarding request headers.<commit_after># Specification for Widebullet

Widebullet is RESTful API gateway with JSON-RPC. It accepts a HTTP request based JSON-RPC.

## API

Widebullet has the APIs below.

 * [POST /wbt](#post-wbt)
 * [GET /stat/go](#get-statgo)

### POST /wbt

Accepts a HTTP request based JSON-RPC and proxies each converted HTTP request to a corresponding endpoint.
And User-Agent and X-Forwarded-For in a request header are forwarded.

The JSON below is a request-body example.

```json
[
  {
    "jsonrpc": "2.0",
    "ep": "ep-1",
    "method": "/user/get",
    "params": {
      "user_id": 1
    },
    "id": "1"
  },
  {
    "jsonrpc": "2.0",
    "ep": "ep-1",
    "http_method": "GET",
    "method": "/item/get",
    "params": {
      "item_id": 2
    },
    "id": "2"
{'fraction_non_alphanumeric': 0.16371971185330714, 'fraction_numerical': 0.01309757694826457, 'mean_word_length': 2.7635467980295565, 'pattern_counts': {'":': 26, '<': 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': '266986', 'n_tokens_mistral': 571, 'n_tokens_neox': 544, 'n_words': 171}