diff --git a/setup.py b/setup.py index 9b94ada..d2068ae 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name='uncurl', - version='0.0.8', + version='0.0.8.1', description='A library to convert curl requests to python-requests.', author='Steve Pulec', author_email='spulec@gmail', diff --git a/uncurl/api.py b/uncurl/api.py index 20e2854..8fed228 100644 --- a/uncurl/api.py +++ b/uncurl/api.py @@ -31,7 +31,7 @@ def parse(curl_command): # If we found JSON and it is a dict, pull it apart. Otherwise, just leave as a string if post_data_json and isinstance(post_data_json, dict): - post_data = dict_to_pretty_string(post_data_json) + post_data = '"""\n{}{}\n"""'.format(base_indent, dict_to_pretty_string(post_data_json)) else: post_data = "'{}'".format(post_data)