summaryrefslogtreecommitdiff
path: root/test.http
blob: 47ed098155c83c8ed4d408ac85d2bbc0b761bd66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# -*- restclient -*-
#
# see https://github.com/pashky/restclient.el

:host := "http://127.0.0.1:3000"
:headers = <<
Accept: application/json
User-Agent: Emacs
#

:form = <<
Content-Type: application/x-www-form-urlencoded
#

# should return all entries
GET :host/query
:headers


# store jenny's number
POST :host/number
:headers
{
 "name": "Jenny",
 "number": "8675309",
 "context": "Number on the wall"
}

# store Bob's number
POST :host/number
:headers
{ "name": "Bob Barker", "number": "+1555678909", "context": "personal"}

# get jenny's number
GET :host/query?number=8675309
:headers

# get bob's
GET :host/query?number=%2B15556789090
:headers