doc: Added note about query strings not having preceding '?' char

This commit is contained in:
kgriffs
2013-04-04 10:08:58 -04:00
parent 4d33abd2aa
commit cdd8151a08
2 changed files with 5 additions and 3 deletions

View File

@@ -46,7 +46,8 @@ class Request(object):
Attributes:
method: HTTP method requested (e.g., GET, POST, etc.)
path: Path portion of the request URL (not including query string).
query_string: Query string portion of the request URL.
query_string: Query string portion of the request URL, without
the preceding '?' character.
stream: Stream-like object for reading the body of the request, if any.
"""

View File

@@ -60,11 +60,12 @@ def create_environ(path='/', query_string='', protocol='HTTP/1.1', port='80',
headers=None, app='', body='', method='GET',
wsgierrors=None):
""" Creates a 'mock' PEP-333 environ dict for simulating WSGI requests
""" Creates a 'mock' PEP-3333 environ dict for simulating WSGI requests
Args:
path: The path for the request (default '/')
query_string: The query string to simulate (default '')
query_string: The query string to simulate, without a
leading '?' (default '')
protocol: The HTTP protocol to simulate (default 'HTTP/1.1')
port: The TCP port to simulate (default '80')
headers: Optional headers to set as a dict or an iterable of tuples