68de6fe15b056e7a86e0898558b7311469c8167e
[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 ## Updating
9
10 ```bash
11 webi curlie@stable
12 ```
13
14 Use the `@beta` tag for pre-releases.
15
16 ## Cheat Sheet
17
18 > If you like the interface of HTTPie but miss the features of curl, curlie is
19 > what you are searching for. Curlie is a frontend to curl that adds the ease of
20 > use of httpie, without compromising on features and performance. All curl
21 > options are exposed with syntax sugar and output formatting inspired from
22 > httpie.
23
24 **Headers** (`:`) are recognized by being in the format `Key-Name:Value`.
25
26 **JSON** (`=`) is the default encoding for `key=value` pairs.
27
28 ### Simple GET
29
30 ```bash
31 curlie -v example.com
32 ```
33
34 ### POST simple JSON with headers
35
36 ```bash
37 curlie -v POST httpbin.org/status/201 "Authorization: Bearer xxxx" "name=John Doe"
38 ```
39
40 ### POST large JSON
41
42 ```bash
43 curlie -v POST httpbin.org/status/201 "Authorization: Bearer xxxx" -d '
44 [
45     {
46         "name": "John Doe"
47     }
48 ]
49 '
50 ```
51
52 ### Spoof Host and SNI
53
54 The `--resolve` option is for when you need to test a local service as if it had
55 a remote hostname and TLS SNI (or when you want to break things ðŸ˜ˆ).
56
57 ```bash
58 curlie https://foo.example.com:8443 "Host: foo.example.com" \
59     --resolve foo.example.com:8443:127.0.0.1
60 ```