request may be json string or djagno QueryDict
diff --git a/plstackapi/util/request.py b/plstackapi/util/request.py
index b520698..467783f 100644
--- a/plstackapi/util/request.py
+++ b/plstackapi/util/request.py
@@ -1,7 +1,11 @@
import ast
+from django.http.request import QueryDict
def parse_request(request):
d = {}
- for (k,v) in request.items():
- d[k] = ast.literal_eval(v)
+ if isinstance(request, unicode):
+ d = ast.literal_eval(request)
+ elif isinstance(request, QueryDict):
+ for (k,v) in request.items():
+ d[k] = ast.literal_eval(v)
return d