Skip to content

Commit

Permalink
JSON-encode dict request args, using pipelines is more convenient now
Browse files Browse the repository at this point in the history
  • Loading branch information
vrok committed Jul 21, 2015
1 parent 3aebcab commit 0099c30
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions panda/request.py
Expand Up @@ -2,6 +2,7 @@
from datetime import datetime, tzinfo, timedelta
import requests
import urllib
import json

class PandaRequest(object):
def __init__(self, verb, path, cred, data={}, timestamp=None):
Expand All @@ -11,6 +12,10 @@ def __init__(self, verb, path, cred, data={}, timestamp=None):
self.data = data
self.timestamp = timestamp

for name, val in self.data.iteritems():
if isinstance(val, dict):
self.data[name] = json.dumps(val)

signed_params = self.signed_params()

self.files = None
Expand Down

0 comments on commit 0099c30

Please sign in to comment.