From: Ben Darnell Date: Tue, 28 Jun 2011 06:44:11 +0000 (-0700) Subject: Correct documentation for HTTPRequest.arguments X-Git-Tag: v2.1.0~13^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b6c8047e29932c929b4a8cbeb5106ffb47e6ea4;p=thirdparty%2Ftornado.git Correct documentation for HTTPRequest.arguments --- 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