-
Notifications
You must be signed in to change notification settings - Fork 0
/
endproint.http
43 lines (31 loc) · 855 Bytes
/
endproint.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
@baseUrl = http://localhost:3000
@contentType = application/json
### Create Product
POST {{baseUrl}}/products HTTP/1.1
content-type: application/json
{
"name": "rice"
}
### search Products
GET {{baseUrl}}/products HTTP/1.1
### FindOne
GET {{baseUrl}}/products/1 HTTP/1.1
### UPDATE
PUT {{baseUrl}}/products/1 HTTP/1.1
content-type: application/json
{
"id": "5e6e11f46864361d7f46d349",
"name": "rice new"
}
### Delete one product
DELETE {{baseUrl}}/products/1 HTTP/1.1
### Login
POST {{baseUrl}}/auth/login HTTP/1.1
content-type: application/json
{
"username": "john",
"password": "changeme"
}
### profile
GET {{baseUrl}}/auth/profile HTTP/1.1
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImpvaG4iLCJzdWIiOjEsImlhdCI6MTU4NDQwOTY4NCwiZXhwIjoxNTg0NDA5NzQ0fQ.VKRrd5YzuFBHMPEjt1I0xV0NZ4lyot68jODuvrQF1AA