mirror of
https://github.com/httpie/cli.git
synced 2025-04-23 12:08:50 +02:00
Added a --verbose / -v flag
When set, the whole request as well as the response is printed. Shortcut for --print=HBhb.
This commit is contained in:
parent
ed888a2657
commit
578acacdf3
@ -163,12 +163,20 @@ output_options.add_argument('--print', '-p', dest='output_options',
|
|||||||
response_body=OUT_RESPONSE_BODY,
|
response_body=OUT_RESPONSE_BODY,
|
||||||
))
|
))
|
||||||
)
|
)
|
||||||
|
output_options.add_argument(
|
||||||
|
'--verbose', '-v', dest='output_options',
|
||||||
|
action='store_const', const=''.join(OUTPUT_OPTIONS),
|
||||||
|
help=_('''
|
||||||
|
Print the whole request as well as response.
|
||||||
|
Shortcut for --print={0}.
|
||||||
|
'''.format(''.join(OUTPUT_OPTIONS)))
|
||||||
|
)
|
||||||
output_options.add_argument(
|
output_options.add_argument(
|
||||||
'--headers', '-t', dest='output_options',
|
'--headers', '-t', dest='output_options',
|
||||||
action='store_const', const=OUT_RESPONSE_HEADERS,
|
action='store_const', const=OUT_RESPONSE_HEADERS,
|
||||||
help=_('''
|
help=_('''
|
||||||
Print only the response headers.
|
Print only the response headers.
|
||||||
It's a shortcut for --print={0}.
|
Shortcut for --print={0}.
|
||||||
'''.format(OUT_RESPONSE_HEADERS))
|
'''.format(OUT_RESPONSE_HEADERS))
|
||||||
)
|
)
|
||||||
output_options.add_argument(
|
output_options.add_argument(
|
||||||
@ -176,7 +184,7 @@ output_options.add_argument(
|
|||||||
action='store_const', const=OUT_RESPONSE_BODY,
|
action='store_const', const=OUT_RESPONSE_BODY,
|
||||||
help=_('''
|
help=_('''
|
||||||
Print only the response body.
|
Print only the response body.
|
||||||
It's a shortcut for --print={0}.
|
Shortcut for --print={0}.
|
||||||
'''.format(OUT_RESPONSE_BODY))
|
'''.format(OUT_RESPONSE_BODY))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user