-
Notifications
You must be signed in to change notification settings - Fork 0
/
curl.http
66 lines (50 loc) · 1.04 KB
/
curl.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
# Register
POST http://localhost:8080/register
Content-Type: application/json
{
"email": "account-one@mail.com",
"password": "password",
"role": "ADMIN"
}
###
# Login
POST http://localhost:8080/login
Content-Type: application/json
{
"email": "account-one@mail.com",
"password": "password"
}
###
# Access User Api
GET http://localhost:8080/user
Accept: application/json
X-Auth-Token: 7236284a-c369-498e-ae43-a3705ec64b2a
###
# Access Admin Api
GET http://localhost:8080/admin
Accept: application/json
X-Auth-Token: 7236284a-c369-498e-ae43-a3705ec64b2a
###
# View Items
GET http://localhost:8080/items
Accept: application/json
X-Auth-Token: 536afac7-4393-4179-b129-e5204e30b6e5
###
# Create Item
POST http://localhost:8080/items
Content-Type: application/json
X-Auth-Token: d73e2d42-a795-414d-a428-e6fa50f68d5d
{
"name": "laptop",
"price": 10000
}
###
# Update Item
PUT http://localhost:8080/items
Content-Type: application/json
X-Auth-Token: d73e2d42-a795-414d-a428-e6fa50f68d5d
{
"id": 1,
"name": "updated-item",
"price": 20000
}