From 6fd0f23f399e51065d63c2dcf33b1c75d7bf7055 Mon Sep 17 00:00:00 2001 From: Joao Delgado Date: Sat, 11 Apr 2015 02:11:22 +0100 Subject: [PATCH] Only serialize json if data is a dict instance --- httpie/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httpie/client.py b/httpie/client.py index ec9e33f2..ad258f24 100644 --- a/httpie/client.py +++ b/httpie/client.py @@ -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: