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:
Jakub Roztocil 2012-03-14 11:14:28 +01:00
parent ed888a2657
commit 578acacdf3

View File

@ -163,12 +163,20 @@ output_options.add_argument('--print', '-p', dest='output_options',
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(
'--headers', '-t', dest='output_options',
action='store_const', const=OUT_RESPONSE_HEADERS,
help=_('''
Print only the response headers.
It's a shortcut for --print={0}.
Shortcut for --print={0}.
'''.format(OUT_RESPONSE_HEADERS))
)
output_options.add_argument(
@ -176,7 +184,7 @@ output_options.add_argument(
action='store_const', const=OUT_RESPONSE_BODY,
help=_('''
Print only the response body.
It's a shortcut for --print={0}.
Shortcut for --print={0}.
'''.format(OUT_RESPONSE_BODY))
)