Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 49 lines (32 sloc) 0.927 kb
598f761 @tj Initial commit
authored
1
2 # Better curl(1)
3
4 `burl(1)` is a tiny shell script augmenting `curl(1)` with some helpful shortcuts
5 to make your day a little bit better.
6
7 ## Installation
8
9 $ make install
10
11 ## Optional hostname
12
13 By default `burl(1)` will assume "http://localhost:3000", however you
14 can alter this by exporting `BURL` in your terminal session:
15
16 ```
17 BURL=http://site-im-testing.com
18 $ burl /pathname
19 ```
20
21 ## -j, --json DATA
22
23 __POST__ data as "Content-Type: application/json":
24
25 ```
26 $ burl -j {"name":"tobi"} http://local/user
27 ```
28
29 ## Expressive header fields
30
31 With `burl(1)` you can define header fields without `-H`:
32
33 ```
34 $ burl If-None-Match etag /users
35 $ burl If-None-Match etag Accept: application/json /users
36 ```
37
38 ## Accept shorthand
39
40 Currently `.json`, `.text` and `.html` shorthands are
41 available and set the Accept header field for you:
42
43 ```
44 $ burl /users
45 $ burl /users .json
46 $ burl /users .text
47 $ burl /users .html
48 ```
Something went wrong with that request. Please try again.