feature(delta): use WEBI_UA for curl.exe
[webi-installers/.git] / curlie / README.md
1 ---
2 title: curlie
3 homepage: https://github.com/rs/curlie
4 tagline: |
5   curlie wraps `curl` with modern defaults and `httpie`-like syntax highlighting
6 ---
7
8 To update or switch versions, run `webi curlie@stable` (or `@v1.6`, `@beta`,
9 etc).
10
11 ## Cheat Sheet
12
13 > If you like the interface of HTTPie but miss the features of curl, curlie is
14 > what you are searching for. Curlie is a frontend to curl that adds the ease of
15 > use of httpie, without compromising on features and performance. All curl
16 > options are exposed with syntax sugar and output formatting inspired from
17 > httpie.
18
19 **Headers** (`:`) are recognized by being in the format `Key-Name:Value`.
20
21 **JSON** (`=`) is the default encoding for `key=value` pairs.
22
23 ### Simple GET
24
25 ```bash
26 curlie -v example.com
27 ```
28
29 ### POST simple JSON with headers
30
31 ```bash
32 curlie -v POST httpbin.org/status/201 "Authorization: Bearer xxxx" "name=John Doe"
33 ```
34
35 ### POST large JSON
36
37 ```bash
38 curlie -v POST httpbin.org/status/201 "Authorization: Bearer xxxx" -d '
39 [
40     {
41         "name": "John Doe"
42     }
43 ]
44 '
45 ```
46
47 ### Spoof Host and SNI
48
49 The `--resolve` option is for when you need to test a local service as if it had
50 a remote hostname and TLS SNI (or when you want to break things ðŸ˜ˆ).
51
52 ```bash
53 curlie https://foo.example.com:8443 "Host: foo.example.com" \
54     --resolve foo.example.com:8443:127.0.0.1
55 ```