mirror of
https://github.com/httpie/cli.git
synced 2024-11-24 08:22:22 +02:00
allow :port style shorthand
This commit is contained in:
parent
81c99886fd
commit
711168a899
@ -138,6 +138,9 @@ class Parser(ArgumentParser):
|
||||
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
|
||||
if self.args.url.startswith(':'):
|
||||
self.args.url = scheme + 'localhost' + self.args.url
|
||||
else:
|
||||
self.args.url = scheme + self.args.url
|
||||
self._process_auth()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user