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

This commit is contained in:
Kareem Kwong 2017-06-12 14:37:16 -04:00 committed by jongleberry
parent 7941fb5221
commit 0a7856ca15

View file

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