]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Correct documentation for HTTPRequest.arguments
authorBen Darnell <ben@bendarnell.com>
Tue, 28 Jun 2011 06:44:11 +0000 (23:44 -0700)
committerBen Darnell <ben@bendarnell.com>
Tue, 28 Jun 2011 06:44:11 +0000 (23:44 -0700)
tornado/httpserver.py

index 922232f6e6481595ed10b4cda62dd17b67e62b4a..791b28e3ae728f3d3f782e125ec38c93c94f28c5 100644 (file)
@@ -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