-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexample-server-config.json
100 lines (99 loc) · 3.23 KB
/
example-server-config.json
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
{
"logfile" : "/var/tmp/mock-server.log",
"servers" : [
{
"name" : "Foobar",
"address" : "0.0.0.0",
"port" : 12345,
"schema" : "http",
"requests_in_order" : true,
"req_config_url" : "/collection/of/request/responses/here/",
"requests" : [
{
"request" : {
"req" : "GET /foo/bar?blah=123"
},
"response" : {
"status" : 200,
"headers" : [
"Server: Foobar 123",
"Date: Sat, 28 Nov 2099 00:45:59 GMT",
"Connection: close",
"Cache-Control: max-age=3600, public",
"Content-Type: text/html; charset=UTF-8",
"Vary: Accept-Encoding, Cookie, User-Agent",
"Content-length: 6"
],
"body" : [
"Hello!"
]
}
},
{
"request" : {
"req" : "GET /foo/bar?blah=456"
},
"response" : {
"status" : 200,
"body" : [
"Hello there, a second time!"
]
}
}
]
},
{
"name" : "Blahblah",
"port" : 54321,
"schema" : "http",
"requests_in_order" : true,
"requests" : [
{
"request" : {
"req" : "GET /bla/baz"
},
"response" : {
"status" : 200,
"body" : [
"Hallo!"
]
}
},
{
"request" : {
"req" : "GET /bla/baz"
},
"response" : {
"status" : 200,
"headers" : [
"Foobar: Blahblah"
],
"body" : [
"Zweite Antwort!"
]
}
},
{
"request" : {
"req" : "POST /bla/baz"
},
"response" : {
"status" : 201,
"headers" : [
"Foobar: Blahblah",
"X-some-header-I-made-up: Hi!"
]
}
}
]
},
{
"name" : "No-requests-server",
"port" : 5555,
"schema" : "http",
"req_config_url" : "/reqs/and/resps/",
"requests" : [
]
}
]
}