Removed the "implicit_content_type" config option

If you used:

    "implicit_content_type": "form"

 You can achieve the the same result with:

     "default_options": ["--form"]

If you used:

    "implicit_content_type": "json"

 Then it's the default behaviour and it can be removed.

 In either case HTTPie will migrate your config file on the next invocation.
This commit is contained in:
Jakub Roztocil
2016-03-03 17:14:39 +08:00
parent 5dbd104c3b
commit 20823c1702
6 changed files with 80 additions and 34 deletions

View File

@@ -189,13 +189,14 @@ def http(*args, **kwargs):
stderr = env.stderr
args = list(args)
extra_args = []
if '--debug' not in args:
if '--traceback' not in args:
extra_args.append('--traceback')
if not any('--timeout' in arg for arg in args):
extra_args.append('--timeout=3')
args = extra_args + args
args_with_config_defaults = args + env.config.default_options
add_to_args = []
if '--debug' not in args_with_config_defaults:
if '--traceback' not in args_with_config_defaults:
add_to_args.append('--traceback')
if not any('--timeout' in arg for arg in args_with_config_defaults):
add_to_args.append('--timeout=3')
args = add_to_args + args
def dump_stderr():
stderr.seek(0)