You've already forked httpie-cli
mirror of
https://github.com/httpie/cli.git
synced 2025-11-06 08:59:22 +02:00
allow :port style shorthand
This commit is contained in:
@@ -138,7 +138,10 @@ class Parser(ArgumentParser):
|
|||||||
if not (self.args.url.startswith((HTTP, HTTPS))):
|
if not (self.args.url.startswith((HTTP, 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
|
if self.args.url.startswith(':'):
|
||||||
|
self.args.url = scheme + 'localhost' + self.args.url
|
||||||
|
else:
|
||||||
|
self.args.url = scheme + self.args.url
|
||||||
self._process_auth()
|
self._process_auth()
|
||||||
|
|
||||||
return self.args
|
return self.args
|
||||||
|
|||||||
Reference in New Issue
Block a user