Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions httpie/cli/definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
'--boundary',
short_help=(
'Specify a custom boundary string for multipart/form-data requests. '
'Only has effect only together with --form.'
'Only has effect together with --form.'` o `'Has effect only together with --form.'
)
)
content_types.add_argument(
Expand Down Expand Up @@ -229,9 +229,9 @@
'-x',
action='count',
default=0,
short_help='Compress the content with Deflate algorithm.',
short_help='Compress the content with the Deflate algorithm.',
help="""
Content compressed (encoded) with Deflate algorithm.
Content compressed (encoded) with the Deflate algorithm.
The Content-Encoding header is set to deflate.

Compression is skipped if it appears that compression ratio is
Expand Down Expand Up @@ -260,7 +260,7 @@ def format_style_help(available_styles, *, isolation_mode: bool = False):
The "{auto_style}" style follows your terminal's ANSI color styles.
For non-{auto_style} styles to work properly, please make sure that the
$TERM environment variable is set to "xterm-256color" or similar
(e.g., via `export TERM=xterm-256color' in your ~/.bashrc).
(e.g., via \`export TERM=xterm-256color\` in your ~/.bashrc).
""")

if isolation_mode:
Expand Down Expand Up @@ -507,7 +507,7 @@ def format_style_help(available_styles, *, isolation_mode: bool = False):
default=False,
short_help='Always stream the response body by line, i.e., behave like `tail -f`.',
help="""
Always stream the response body by line, i.e., behave like `tail -f'.
Always stream the response body by line, i.e., behave like `tail -f`.

Without --stream and with --pretty (either set or implied),
HTTPie fetches the whole response before it outputs the processed data.
Expand Down Expand Up @@ -593,7 +593,7 @@ def format_style_help(available_styles, *, isolation_mode: bool = False):
short_help='Create, or reuse and update a session.',
help="""
Create, or reuse and update a session. Within a session, custom headers,
auth credential, as well as any cookies sent by the server persist between
auth credentials, as well as any cookies sent by the server persist between
requests.

Session files are stored in:
Expand All @@ -611,7 +611,7 @@ def format_style_help(available_styles, *, isolation_mode: bool = False):
type=session_name_validator,
short_help='Create or read a session without updating it',
help="""
Create or read a session without updating it form the request/response
Create or read a session without updating it from the request/response
exchange.

""",
Expand Down Expand Up @@ -824,7 +824,7 @@ def format_auth_help(auth_plugins_mapping, *, isolation_mode: bool = False):
'--ssl',
dest='ssl_version',
choices=sorted(AVAILABLE_SSL_VERSION_ARG_MAPPING.keys()),
short_help='The desired protocol version to used.',
short_help='The desired protocol version to use.',
help="""
The desired protocol version to use. This will default to
SSL v2.3 which will negotiate the highest protocol that both
Expand All @@ -837,7 +837,7 @@ def format_auth_help(auth_plugins_mapping, *, isolation_mode: bool = False):

CIPHERS_CURRENT_DEFAULTS = (
"""
See `http --help` for the default ciphers list on you system.
See \`http --help\` for the default ciphers list on your system.

"""
if IS_MAN_PAGE else
Expand Down Expand Up @@ -889,7 +889,7 @@ def format_auth_help(auth_plugins_mapping, *, isolation_mode: bool = False):
type=SSLCredentials,
short_help='The passphrase to be used to with the given private key.',
help="""
The passphrase to be used to with the given private key. Only needed if --cert-key
The passphrase to be used with the given private key. Only needed if --cert-key
is given and the key file requires a passphrase.
If not provided, you’ll be prompted interactively.
"""
Expand Down Expand Up @@ -929,7 +929,7 @@ def format_auth_help(auth_plugins_mapping, *, isolation_mode: bool = False):
'--traceback',
action='store_true',
default=False,
short_help='Prints the exception traceback should one occur.',
short_help='Print the exception traceback should one occur.',
)
troubleshooting.add_argument(
'--default-scheme',
Expand Down
2 changes: 1 addition & 1 deletion httpie/plugins/builtin.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def get_auth(


class BearerAuthPlugin(BuiltinAuthPlugin):
name = 'Bearer HTTP Auth'
name = 'Bearer HTTP auth'
auth_type = 'bearer'
netrc_parse = False
auth_parse = False
Expand Down
6 changes: 3 additions & 3 deletions httpie/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ def http_status_to_exit_status(http_status: int, follow=False) -> ExitStatus:

"""
if 300 <= http_status <= 399 and not follow:
# Redirect
# Redirect.
return ExitStatus.ERROR_HTTP_3XX
elif 400 <= http_status <= 499:
# Client Error
# Client Error.
return ExitStatus.ERROR_HTTP_4XX
elif 500 <= http_status <= 599:
# Server Error
# Server Error.
return ExitStatus.ERROR_HTTP_5XX
else:
return ExitStatus.SUCCESS