-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.http
55 lines (42 loc) · 1008 Bytes
/
test.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
@adminUrl=http://localhost:3000/admin/api
@adminRestUrl={{adminUrl}}/rest
@json=Content-Type: application/json
@token=Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVlMGNkZWZkNzg1MTc2MzRiNDI1YWJiNCIsImlhdCI6MTU3ODE0NTc5MH0.CsVTbEZrF6h6m_K7iCfPLWCUUzu8xNp0a3fBj1XNLdE
### 注册
POST {{adminUrl}}/auth/register
{{json}}
{
"username": "zhangsan",
"password": "123456"
}
### 登录
POST {{adminUrl}}/auth/login
{{json}}
{
"username": "zhangsan",
"password": "123456"
}
### 创建订阅
POST {{adminRestUrl}}/subscribers
{{json}}
{{token}}
{
"name": "xingxing",
"subscribedToChannel": "123"
}
### 删除某个订阅
DELETE {{adminRestUrl}}/subscribers/5e109918059c380bfc28189f
{{token}}
### 更新某个订阅
PUT {{adminRestUrl}}/subscribers/5e109e1496decd1b7448d4a0
{{json}}
{{token}}
{
"name": "lisi"
}
### 获取所有订阅
GET {{adminRestUrl}}/subscribers
{{token}}
### 获取某个订阅
GET {{adminRestUrl}}/subscribers/5e109918059c380bfc28189f
{{token}}