Skip to content

Commit

Permalink
Simplify logic to match what we do for the Replayer
Browse files Browse the repository at this point in the history
  • Loading branch information
mattrobenolt committed Jul 18, 2014
1 parent a85abb0 commit 23869d0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/sentry/interfaces/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,11 @@ def to_curl(self):
bits = []
if method != 'GET':
bits.append('-X' + method)
if isinstance(self.data, basestring):
bits.append('--data ' + quote(self.data))
elif isinstance(self.data, (list, tuple, dict)):
bits.append('--data ' + quote(urlencode(self.data)))
data = self.data
if isinstance(data, dict):
data = urlencode(data)
if isinstance(data, basestring):
bits.append('--data ' + quote(data))
bits.append(quote(self.full_url))
for header in self.headers.iteritems():
bits.append('-H ' + quote('%s: %s' % header))
Expand Down

0 comments on commit 23869d0

Please sign in to comment.