Skip to content

HTTPS clone URL

Subversion checkout URL

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