From 0a7856ca156245e13dad568d8a14045d1a62cb54 Mon Sep 17 00:00:00 2001 From: Kareem Kwong Date: Mon, 12 Jun 2017 14:37:16 -0400 Subject: [PATCH] docs: Add note about overwriting charset in response.type (#993) --- docs/api/response.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/api/response.md b/docs/api/response.md index 2253cf9..f66aa23 100644 --- a/docs/api/response.md +++ b/docs/api/response.md @@ -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...)