-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrequests.http
More file actions
54 lines (45 loc) · 1011 Bytes
/
requests.http
File metadata and controls
54 lines (45 loc) · 1011 Bytes
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
### Global variables
@baseUrl = http://localhost:8090
@contentType = application/json
### Mock configuration management
GET {{baseUrl}}/__mock/config
Content-Type: {{contentType}}
Accept: {{contentType}}
### Logs management
GET {{baseUrl}}/__mock/logs
Content-Type: {{contentType}}
Accept: {{contentType}}
### Clear logs
DELETE {{baseUrl}}/__mock/logs
Content-Type: {{contentType}}
Accept: {{contentType}}
### Add new endpoint
POST {{baseUrl}}/__mock/endpoints
Content-Type: {{contentType}}
Accept: {{contentType}}
{
"method": "POST",
"path": "/example-endpoint",
"response": {
"message": "Example response"
},
"status": 200,
"headers": {
"Content-Type": "application/json"
}
}
### Remove endpoint
DELETE {{baseUrl}}/__mock/endpoints
Content-Type: {{contentType}}
Accept: {{contentType}}
{
"method": "POST",
"path": "/example-endpoint"
}
### Example dynamic endpoint
POST {{baseUrl}}/example-endpoint
Content-Type: {{contentType}}
Accept: {{contentType}}
{
"key": "value"
}