mirror of
https://github.com/httpie/cli.git
synced 2024-11-24 08:22:22 +02:00
Consistent request-response separators.
This commit is contained in:
parent
f73bfea6b8
commit
edf87c3392
@ -119,7 +119,12 @@ def get_output(args, env, request, response):
|
||||
with_body=OUT_RESP_BODY in args.output_options)
|
||||
)
|
||||
|
||||
return b''.join(exchange)
|
||||
output = b'\n\n\n'.join(exchange)
|
||||
|
||||
if env.stdout_isatty:
|
||||
output += b'\n\n'
|
||||
|
||||
return output
|
||||
|
||||
|
||||
def get_exist_status(code, allow_redirects=False):
|
||||
|
@ -79,9 +79,6 @@ def format(msg, prettifier=None, with_headers=True, with_body=True,
|
||||
|
||||
chunks.append(body)
|
||||
|
||||
if env.stdout_isatty:
|
||||
chunks.append(b'\n\n')
|
||||
|
||||
return b''.join(chunks)
|
||||
|
||||
|
||||
@ -211,7 +208,6 @@ class OutputProcessor(object):
|
||||
]
|
||||
|
||||
def __init__(self, env, **kwargs):
|
||||
self.env = env
|
||||
processors = [
|
||||
cls(env, **kwargs)
|
||||
for cls in self.installed_processors
|
||||
|
Loading…
Reference in New Issue
Block a user