Allow Request() to be stitched together manually
This commit is contained in:
parent
2006927a4e
commit
c960e9a77f
|
@ -7,7 +7,11 @@ class InvalidArgumentException(BaseException):
|
|||
pass
|
||||
|
||||
class Request:
|
||||
def __init__(self, env):
|
||||
def __init__(self, env = None):
|
||||
if env:
|
||||
self.fromEnv(env)
|
||||
|
||||
def fromEnv(self, env):
|
||||
if env["REQUEST_METHOD"] == "POST":
|
||||
self.args = cgi.parse_qs(env['wsgi.input'].readline().decode(), True)
|
||||
elif env["REQUEST_METHOD"] == "GET":
|
||||
|
|
Loading…
Reference in a new issue