From 3b6c8047e29932c929b4a8cbeb5106ffb47e6ea4 Mon Sep 17 00:00:00 2001 From: Ben Darnell Date: Mon, 27 Jun 2011 23:44:11 -0700 Subject: [PATCH] Correct documentation for HTTPRequest.arguments --- tornado/httpserver.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tornado/httpserver.py b/tornado/httpserver.py index 922232f6e..791b28e3a 100644 --- a/tornado/httpserver.py +++ b/tornado/httpserver.py @@ -433,6 +433,8 @@ class HTTPConnection(object): class HTTPRequest(object): """A single HTTP request. + All attributes are type `str` unless otherwise noted. + .. attribute:: method HTTP request method, e.g. "GET" or "POST" @@ -461,7 +463,7 @@ class HTTPRequest(object): .. attribute:: body - Request body, if present. + Request body, if present, as a byte string. .. attribute:: remote_ip @@ -483,7 +485,10 @@ class HTTPRequest(object): GET/POST arguments are available in the arguments property, which maps arguments names to lists of values (to support multiple values - for individual names). Names and values are both unicode always. + for individual names). Names are of type `str`, while arguments + are byte strings. Note that this is different from + `RequestHandler.get_argument`, which returns argument values as + unicode strings. .. attribute:: files -- 2.47.2