docs: added note about arrays (#964)

Added note about arrays being returned as JSON.
master
Francisco Presencia 2017-04-24 01:17:48 +02:00 committed by jongleberry
parent 2da3dd49fa
commit 3bbb74b3ee
1 changed files with 2 additions and 2 deletions

View File

@ -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`.
@ -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)