-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathcase.frank
43 lines (36 loc) · 846 Bytes
/
case.frank
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
// This is a frank test case file
// -- https://github.com/txthinking/frank
url="https://httpbin.org"
some="thing"
GET /get
Response
GET /ip Get my IP
header["X-Hello-Frank"] = "Frank"
query.key0 = "value0"
Response
must(status==200)
POST /post Post form
header["Content-Type"] = "application/x-www-form-urlencoded"
form.key0 = "value0"
Response
must(status==200)
POST /post Post file
header["Content-Type"] = "multipart/form-data; boundary=" + boundary
form.key0 = "valueo"
form.key1 = "@/etc/hosts"
Response
must(status==200)
POST /post Post json data
header["Accept"] = "application/json"
header["Content-Type"] = "application/json"
json.key0 = "value0"
json.key1 = "value1"
json.key2 = some
Response
must(status==200)
j = JSON.parse(body)
myip = j.origin
GET /etag/:myip Just a GET request
query.key0 = myip
Response
must(status==200)