mirror of
https://github.com/httpie/cli.git
synced 2024-11-28 08:38:44 +02:00
Cleanup
This commit is contained in:
parent
63ed4d32a7
commit
bc756cb6a2
@ -889,7 +889,7 @@ support that, the whole file will simply be downloaded:
|
||||
Other notes:
|
||||
|
||||
* The ``--download`` option only changes how the response body is treated.
|
||||
* You can still set custom headers, use ``--verbose, -v``, etc.
|
||||
* You can still set custom headers, use sessions, ``--verbose, -v``, etc.
|
||||
* ``--download`` always implies ``--follow`` (redirects are followed).
|
||||
* HTTPie exits with status code ``1`` (error) if the body hasn't been fully
|
||||
downloaded.
|
||||
|
@ -115,8 +115,7 @@ class Parser(ArgumentParser):
|
||||
self._parse_items()
|
||||
if not env.stdin_isatty:
|
||||
self._body_from_file(self.env.stdin)
|
||||
if not (self.args.url.startswith(HTTP)
|
||||
or self.args.url.startswith(HTTPS)):
|
||||
if not (self.args.url.startswith((HTTP, HTTPS))):
|
||||
# Default to 'https://' if invoked as `https args`.
|
||||
scheme = HTTPS if self.env.progname == 'https' else HTTP
|
||||
self.args.url = scheme + self.args.url
|
||||
|
@ -19,7 +19,6 @@ To make it run faster and offline you can::
|
||||
HTTPBIN_URL=http://localhost:5000 tox
|
||||
|
||||
"""
|
||||
from io import BytesIO
|
||||
import subprocess
|
||||
import os
|
||||
import sys
|
||||
|
Loading…
Reference in New Issue
Block a user