Skip to content

Commit

Permalink
docs: added note about arrays (#964)
Browse files Browse the repository at this point in the history
Added note about arrays being returned as JSON.
  • Loading branch information
franciscop authored and jonathanong committed Apr 23, 2017
1 parent 2da3dd4 commit 3bbb74b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/api/response.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ so you can make a correction.
- `string` written
- `Buffer` written
- `Stream` piped
- `Object` json-stringified
- `Object` || `Array` json-stringified
- `null` no content response

If `response.status` has not been set, Koa will automatically set the status to `200` or `204`.
Expand Down Expand Up @@ -156,7 +156,7 @@ app.use(function * (next) {

#### Object

The Content-Type is defaulted to application/json.
The Content-Type is defaulted to application/json. This includes plain objects `{ foo: 'bar' }` and arrays `['foo', 'bar']`.

### response.get(field)

Expand Down

0 comments on commit 3bbb74b

Please sign in to comment.