-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclient.http
105 lines (73 loc) · 1.82 KB
/
client.http
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
100
101
102
103
104
105
@host = http://localhost:8080
###
GET {{host}}/ping HTTP/1.1
content-type: application/json
### get all files
GET {{host}}/get-file-list HTTP/1.1
content-type: application/json
###
POST {{host}}/login HTTP/1.1
content-type: application/json
{
"username":"litingting",
"password":"123"
}
###
GET {{host}}/send-mq HTTP/1.1
content-type: application/json
###
GET {{host}}/receive-mq HTTP/1.1
content-type: application/json
###
GET {{host}}/get-minio HTTP/1.1
content-type: application/json
###
GET {{host}}/test-product HTTP/1.1
content-type: application/json
### upload vedio
POST {{host}}/upload-video HTTP/1.1
content-type: multipart/form-data; boundary=----WebKitFormBoundarynsh5ZWs5fFZk50ou
------WebKitFormBoundarynsh5ZWs5fFZk50ou
Content-Disposition: form-data; name="file"; filename="sample-5s.mp4"
Content-Type: video/mp4
< ./cmd/web/html/sample-5s.mp4
------WebKitFormBoundarynsh5ZWs5fFZk50ou--
### upload dummpy file
# (test by tony)
POST {{host}}/upload-video HTTP/1.1
content-type: multipart/form-data; boundary=----WebKitFormBoundarynsh5ZWs5fFZk50ou
------WebKitFormBoundarynsh5ZWs5fFZk50ou
Content-Disposition: form-data; name="file"; filename="test.py"
Content-Type: text/plain
< ./sample.text
------WebKitFormBoundarynsh5ZWs5fFZk50ou--
// 测试增加 file 和 status
###
POST {{host}}/insert-file-status HTTP/1.1
content-type: application/json
{
"file_id":0,
"status":2
}
// 测试增加 file 和 status
###
POST {{host}}/update-file-status HTTP/1.1
content-type: application/json
{
"file_id":0,
"status":1
}
// 测试删除 file
@fileId = 6
###
DELETE {{host}}/file/{{fileId}} HTTP/1.1
content-type: application/json
// 项目初始化时增加管理员
###
POST {{host}}/register HTTP/1.1
content-type: application/json
{
"username":"admin",
"password":"admin",
"role":"admin"
}