-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathclient.http
75 lines (56 loc) · 1.14 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
@host = localhost
@port = 3000
@uriBase = http://{{host}}:{{port}}
@uri = {{uriBase}}
@contentType = application/json
@johnDoeUserId = 520c2eb5-e83b-4ef5-a343-85756bcce149
### createUser
// @name createUser
POST {{uri}}/user HTTP/1.1`
Content-Type: {{contentType}}
{
"username": "koakh",
"email": "[email protected]",
"password": "12345678"
}
### updateUser
// @name updateUser
PUT {{uri}}/user/{{johnDoeUserId}} HTTP/1.1
Content-Type: {{contentType}}
{
"email": "[email protected]",
"password": "87654321"
}
### findUser
// @name findUser
GET {{uri}}/user/{{johnDoeUserId}} HTTP/1.1
Content-Type: {{contentType}}
{
}
### findAllUsers
// @name findAllUsers
GET {{uri}}/user HTTP/1.1
Content-Type: {{contentType}}
{
"skip": 0,
"take": 5
}
### deleteUser
// @name deleteUser
DELETE {{uri}}/user/{{johnDoeUserId}} HTTP/1.1
Content-Type: {{contentType}}
{
}
### loginUser
// @name loginUser
POST {{uri}}/auth/signin HTTP/1.1
Content-Type: {{contentType}}
{
// after create user
// "username": "koakh",
// "password": "12345678"
"username": "johndoe",
"password": "12345678"
// after update user
// "password": "87654321"
}