docs: added note about arrays (#964)

Added note about arrays being returned as JSON.
This commit is contained in:
Francisco Presencia 2017-04-24 01:17:48 +02:00 committed by jongleberry
parent 2da3dd49fa
commit 3bbb74b3ee

View file

@ -118,7 +118,7 @@ so you can make a correction.
- `string` written - `string` written
- `Buffer` written - `Buffer` written
- `Stream` piped - `Stream` piped
- `Object` json-stringified - `Object` || `Array` json-stringified
- `null` no content response - `null` no content response
If `response.status` has not been set, Koa will automatically set the status to `200` or `204`. 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 #### 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) ### response.get(field)