summaryrefslogtreecommitdiff
path: root/test.http
blob: 5425f9afc589dc65fefb625a66df66dd722edeca (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
# -*- 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 {results: [{ “name”: “Bob Barker”, “number”: “+15556789090”, “context”: “personal”}]}
GET :host/query?number=%2B15556789090
:headers

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


# should return 200
POST :host/number
:headers
{
 "name": "Jenny",
 "number": "8675309",
 "context": "Number on the wall"
}