mirror of
https://github.com/httpie/cli.git
synced 2024-12-29 09:49:10 +01:00
Updated README.
This commit is contained in:
parent
1aa77017d5
commit
52dd6adaa3
15
README.rst
15
README.rst
@ -250,6 +250,17 @@ If the port is omitted, then port 80 is assumed.
|
||||
GET /bar HTTP/1.1
|
||||
Host: localhost:3000
|
||||
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ http :
|
||||
|
||||
|
||||
.. code-block:: http
|
||||
|
||||
GET / HTTP/1.1
|
||||
Host: localhost
|
||||
|
||||
If find yourself manually constructing URLs with **querystring parameters**
|
||||
on the terminal, you may appreciate the ``param==value`` syntax for appending
|
||||
URL parameters so that you don't have to worry about escaping the ``&``
|
||||
@ -1256,7 +1267,9 @@ Changelog
|
||||
* `0.8.0-dev`_
|
||||
* Added ``field=@file.txt`` and ``field:=@file.json`` for embedding
|
||||
the contents of text and JSON files into request data.
|
||||
* Added curl-style shorthand for localhost
|
||||
* Added curl-style shorthand for localhost.
|
||||
* Fixed request ``Host`` header value output so that it doesn't contain
|
||||
credentials, if included in the URL.
|
||||
* `0.7.1`_ (2013-09-24)
|
||||
* Added ``--ignore-stdin``.
|
||||
* Added support for auth plugins.
|
||||
|
@ -138,8 +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
|
||||
|
||||
# See if we're using curl style shorthand for localhost (:3000/foo)
|
||||
shorthand = re.match(r'^:(?!:)(\d*)(\/?.*)$', self.args.url)
|
||||
shorthand = re.match(r'^:(?!:)(\d*)(/?.*)$', self.args.url)
|
||||
if shorthand:
|
||||
port = shorthand.group(1)
|
||||
rest = shorthand.group(2)
|
||||
|
Loading…
Reference in New Issue
Block a user