From 22c035bbea52cd40d4c3b28c3c08a42f062e9d95 Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Fri, 8 Nov 2013 15:35:32 -0800 Subject: [PATCH] add ctx.query docs to clarify lack of nested object support --- docs/api.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/api.md b/docs/api.md index ca0c973..7cb4379 100644 --- a/docs/api.md +++ b/docs/api.md @@ -296,7 +296,11 @@ this.type = 'png'; ### ctx.query - Get parsed query-string, for example "color=blue&size=small": + Get parsed query-string, returning an empty object when no + query-string is present. Note that this getter does _not_ + support nested parsing. + + For example "color=blue&size=small": ```js { @@ -305,11 +309,10 @@ this.type = 'png'; } ``` - __NOTE__: this property returns `{}` when no query-string is present. - ### ctx.query= - Set query-string to the given object. + Set query-string to the given object. Note that this + setter does _not_ support nested objects. ```js this.query = { next: '/login' };