docs: Add note about overwriting charset in response.type (#993)

master
Kareem Kwong 2017-06-12 14:37:16 -04:00 committed by jongleberry
parent 7941fb5221
commit 0a7856ca15
1 changed files with 2 additions and 3 deletions

View File

@ -217,9 +217,8 @@ ctx.type = 'png';
```
Note: when appropriate a `charset` is selected for you, for
example `response.type = 'html'` will default to "utf-8", however
when explicitly defined in full as `response.type = 'text/html'`
no charset is assigned.
example `response.type = 'html'` will default to "utf-8". If you need to overwrite `charset`,
use `ctx.set('Content-Type', 'text/html')` to set response header field to value directly.
### response.is(types...)