This commit is contained in:
Jakub Roztocil 2013-04-27 11:57:13 -03:00
parent 63ed4d32a7
commit bc756cb6a2
3 changed files with 2 additions and 4 deletions

View File

@ -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.

View File

@ -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

View File

@ -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