mirror of
https://github.com/httpie/cli.git
synced 2024-11-25 09:13:25 +01:00
Only serialize json if data is a dict instance
This commit is contained in:
parent
483546d781
commit
6fd0f23f39
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user