Skip to content

Commit

Permalink
Merge pull request #337 from joaodelgado/json-serialization
Browse files Browse the repository at this point in the history
Only serialize json if data is a dict instance
  • Loading branch information
jkbrzt committed Apr 24, 2015
2 parents 483546d + 6fd0f23 commit d8b819b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion httpie/client.py
Expand Up @@ -92,7 +92,7 @@ def get_requests_kwargs(args, base_headers=None):
# Serialize JSON data, if needed.
data = args.data
auto_json = data and not args.form
if args.json or auto_json and isinstance(data, dict):
if (args.json or auto_json) and isinstance(data, dict):
if data:
data = json.dumps(data)
else:
Expand Down

0 comments on commit d8b819b

Please sign in to comment.