-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhook.hurl
46 lines (40 loc) · 1.11 KB
/
hook.hurl
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
41
42
43
44
45
# /hook/webhook POST -------------
POST {{BASE_URL}}/hook/webhook
Content-Type: application/json
Authorization: Bearer {{API_KEY}}
{
"action": "feed",
"url": "https://www.nytimes.com",
"secret": "secret"
}
HTTP 200
[Asserts]
header "Content-Type" == "application/json; charset=utf-8"
jsonpath "$.status" == "success"
jsonpath "$.action" == "feed"
jsonpath "$.url" == "https://www.nytimes.com"
# ---------------------------------
# /hook/webhook GET -------------
GET {{BASE_URL}}/hook/webhook
Content-Type: application/json
Authorization: Bearer {{API_KEY}}
HTTP 200
[Asserts]
header "Content-Type" == "application/json; charset=utf-8"
jsonpath "$.status" == "success"
jsonpath "$.feed" == "https://www.nytimes.com"
jsonpath "$.updated" exists
# ---------------------------------
# /hook/webhook DELETE -------------
DELETE {{BASE_URL}}/hook/webhook
Content-Type: application/json
Authorization: Bearer {{API_KEY}}
{
"action": "feed"
}
HTTP 200
[Asserts]
header "Content-Type" == "application/json; charset=utf-8"
jsonpath "$.status" == "success"
jsonpath "$.action" == "feed"
# ---------------------------------