Skip to content

Commit

Permalink
out_http: Add json_array parameter description
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Hatake <hatake@clear-code.com>
  • Loading branch information
cosmo0920 committed Jun 9, 2020
1 parent 3fd5e5f commit b14010a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion plugins/output/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,22 @@ The proxy for HTTP request

Content-Type for HTTP request. `out_http` automatically set `Content-Type` for built-in formatters when this parameter is not specified. Here is a table:

* `json`: `application/x-ndjson`
* `json(json_array: false)`: `application/x-ndjson`
* `json(json_array: true)`: `application/json`
* `csv`: `text/csv`
* `tsv`, `ltsv`: `text/tab-separated-values`
* `msgpack`: `application/x-msgpack`
* `out_file`, `single_value`, `stdout`, `hash`: `text/plain`

### json_array

| type | default | version |
|:-------|:--------|:--------|
| bool | false | 1.10.4 |

Using array format of JSON. This parameter is used and valid only for json format.
When `json_array` as true, Content-Type should be `application/json` and be able to use JSON data for the HTTP request body.

### &lt;format&gt; directive

The format of the payload. The default `@type` is `json`. Here is `single_value` example:
Expand Down

0 comments on commit b14010a

Please sign in to comment.