-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresponsive.http
More file actions
94 lines (75 loc) · 2.01 KB
/
responsive.http
File metadata and controls
94 lines (75 loc) · 2.01 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
### Get all post
GET http://localhost:8070/post
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2Nlc3NfdXVpZCI6IjgyNDAyZWYwLWQwNTctNDkwZi04OTIzLTgxZjM2YmE3MzkwMSIsImF1dGhvcml6ZWQiOnRydWUsImV4cCI6MTY0NjQxMTcwNywidXNlcl9pZCI6MX0.1pr5adOjbYn772kdxAKnP4hREhGQWhGXtIUdoPFI6Ck
### Get an post
GET http://localhost:8070/post/1
Content-Type: application/json
### Create a new post
POST http://localhost:8070/post
Content-Type: application/json
{
"title": "Post title 1",
"content": "Post content 1",
"published": true,
"authorId": 1
}
### Update a post
PUT http://localhost:8070/post/2
Content-Type: application/json
{
"title": "Post title edited",
"content": "Post content edit",
"published": true,
"authorId": 1
}
### Delete a post
DELETE http://localhost:8070/post/11
Content-Type: application/json
### Get all user
GET http://localhost:8070/user
Content-Type: application/json
### Get an user
GET http://localhost:8070/user/1
Content-Type: application/json
### Create a new user
POST http://localhost:8070/user
Content-Type: application/json
{
"email": "2@g.com",
"name": "user1",
"pass": "user1",
"role": "user"
}
### Update a user
PUT http://localhost:8070/user/2
Content-Type: application/json
{
"email": "2@g.com",
"name": "user2",
"pass": "user1"
}
### Delete a user
DELETE http://localhost:8070/user/11
Content-Type: application/json
### Login
POST http://localhost:8070/login
Content-Type: application/json
{
"email": "1@g.com",
"pass": "admin"
}
### Register
POST http://localhost:8070/register
Content-Type: application/json
{
"email": "3@g.com",
"name": "user2",
"pass": "user2"
}
### Get token by refresh token
POST http://localhost:8070/token/refresh
Content-Type: application/json
{
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2MzUwNTg5ODUsInJlZnJlc2hfdXVpZCI6ImFiYzdkYTRlLTNkMWQtNGEwMS1iMjgyLWNiOTRlMTk4ZGU4MyIsInVzZXJfaWQiOjd9.4k-DW_O1L4y5Hlk56ZElFu_qJaQAWPBqO4dqfQos9VE"
}