forked from extern/httpie-cli
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:
|
Other notes:
|
||||||
|
|
||||||
* The ``--download`` option only changes how the response body is treated.
|
* 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).
|
* ``--download`` always implies ``--follow`` (redirects are followed).
|
||||||
* HTTPie exits with status code ``1`` (error) if the body hasn't been fully
|
* HTTPie exits with status code ``1`` (error) if the body hasn't been fully
|
||||||
downloaded.
|
downloaded.
|
||||||
|
@ -115,8 +115,7 @@ class Parser(ArgumentParser):
|
|||||||
self._parse_items()
|
self._parse_items()
|
||||||
if not env.stdin_isatty:
|
if not env.stdin_isatty:
|
||||||
self._body_from_file(self.env.stdin)
|
self._body_from_file(self.env.stdin)
|
||||||
if not (self.args.url.startswith(HTTP)
|
if not (self.args.url.startswith((HTTP, HTTPS))):
|
||||||
or self.args.url.startswith(HTTPS)):
|
|
||||||
# Default to 'https://' if invoked as `https args`.
|
# Default to 'https://' if invoked as `https args`.
|
||||||
scheme = HTTPS if self.env.progname == 'https' else HTTP
|
scheme = HTTPS if self.env.progname == 'https' else HTTP
|
||||||
self.args.url = scheme + self.args.url
|
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
|
HTTPBIN_URL=http://localhost:5000 tox
|
||||||
|
|
||||||
"""
|
"""
|
||||||
from io import BytesIO
|
|
||||||
import subprocess
|
import subprocess
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
Loading…
Reference in New Issue
Block a user