1
0
mirror of https://github.com/httpie/cli.git synced 2025-08-10 22:42:05 +02:00

Strip leading :// from URLs to allow quick conversion of a pasted URL to calls (#1197)

* Strip leading `://` from URLs to allow quick conversion of a pasted URL to calls

Closes #1195

* Markdown lint

* Cleanup

* Cleanup

* Drop extraneous space

* Fix example
This commit is contained in:
Jakub Roztocil
2021-11-05 13:59:23 +01:00
committed by GitHub
parent 434512e92f
commit 861b8b36a8
4 changed files with 28 additions and 4 deletions

View File

@@ -482,14 +482,26 @@ The default scheme is `http://` and can be omitted from the argument:
```bash
$ http example.org
# => http://example.org
# http://example.org
```
HTTPie also installs an `https` executable, where the default scheme is `https://`:
```bash
$ https example.org
# => https://example.org
# https://example.org
```
When you paste a URL into the terminal, you can even keep the `://` bit in the URL argument to quickly convert the URL into an HTTPie call just by adding a space after the protocol name.
```bash
$ https ://example.org
# → https://example.org
```
```bash
$ http ://example.org
# → http://example.org
```
### Querystring parameters
@@ -1947,7 +1959,6 @@ HTTPie has the following community channels:
- [curl](https://curl.haxx.se) — a "Swiss knife" command line tool and an exceptional library for transferring data with URLs.
### Contributing
### Contributing
See [CONTRIBUTING](https://github.com/httpie/httpie/blob/master/CONTRIBUTING.md).