-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathrequests.http
More file actions
70 lines (56 loc) · 1.59 KB
/
Copy pathrequests.http
File metadata and controls
70 lines (56 loc) · 1.59 KB
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
### CreateUser
POST http://localhost:8080/user
Content-Type: application/json
{ "nickname":"restCreate0001",
"firstname":"restUser",
"lastname":"restUser",
"gender":"male",
"pass":"b7d7bd8ad5a68a5b4f1f24b87c12a0f2",
"status":1
}
> {%
client.global.set("user_id", response.body.id)
%}
### UpdateUser
PUT http://localhost:8080/user/{{user_id}}
Content-Type: application/json
{ "nickname":"restCreate0009",
"firstname":"restUser",
"lastname":"restUser",
"gender":"male",
"pass":"b7d7bd8ad5a68a5b4f1f24b87c12a0f2",
"status":1
}
### GetUser
GET http://localhost:8080/user/{{user_id}}
Accept: application/json
### DeleteUser
DELETE http://localhost:8080/user/{{user_id}}
Accept: application/json
### GetAllUsersNoCursor
GET http://localhost:8080/user?limit=15
Accept: application/json
### GetAllUsers
GET http://localhost:8080/user?limit=100
X-NextCursor: 100
Accept: application/json
> {%
client.global.set("nextCursor", response.headers.valueOf("X-Nextcursor"))
client.global.set("prevCursor", response.headers.valueOf("X-Prevcursor"))
%}
### GetAllUsersCursorNext
GET http://localhost:8080/user?limit=100
X-NextCursor: {{nextCursor}}
Accept: application/json
> {%
client.global.set("nextCursor", response.headers.valueOf("X-Nextcursor"))
client.global.set("prevCursor", response.headers.valueOf("X-Prevcursor"))
%}
### GetAllUsersCursorPrev
GET http://localhost:8080/user?limit=100
X-NextCursor: {{prevCursor}}
Accept: application/json
> {%
client.global.set("nextCursor", response.headers.valueOf("X-Nextcursor"))
client.global.set("prevCursor", response.headers.valueOf("X-Prevcursor"))
%}