Change to sending GET/POST as dicts of lists

This commit is contained in:
Andrew Godwin 2015-09-02 00:09:38 -07:00
parent 39a82e2a5c
commit 062035f992
2 changed files with 3 additions and 2 deletions

View File

@ -18,6 +18,7 @@ class InterfaceProtocol(WebSocketServerProtocol):
self.channel_backend = channel_backends[DEFAULT_CHANNEL_BACKEND]
self.request_info = {
"path": request.path,
"GET": request.params,
}
def onOpen(self):

View File

@ -8,8 +8,8 @@ def encode_request(request):
"""
# TODO: More stuff
value = {
"GET": list(request.GET.lists()),
"POST": list(request.POST.lists()),
"GET": dict(request.GET.lists()),
"POST": dict(request.POST.lists()),
"COOKIES": request.COOKIES,
"META": {k: v for k, v in request.META.items() if not k.startswith("wsgi")},
"path": request.path,