-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcurl_commad.txt
40 lines (34 loc) · 1.36 KB
/
curl_commad.txt
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
curl --request POST \
--url http://localhost:3000/auth/register \
--header 'Content-Type: application/json' \
--data '{
"email": "[email protected]",
"password": "12345678"
}'
curl --request POST \
--url http://localhost:3000/auth/login \
--header 'Content-Type: application/json' \
--data '{
"email": "[email protected]",
"password": "12345678"
}'
curl --request POST \
--url http://localhost:3000/product/ \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MDYyNTQwNDAsImlzcyI6ImF1dGgtc2VydmljZSIsIklkIjoxLCJFbWFpbCI6ImVsb25AbXVzay5jb20ifQ.EJizTN1868TzPkGJ91NmlCA3bTWWjjEqU-cLdkbCzKg' \
--header 'Content-Type: application/json' \
--data '{
"name": "Product A",
"stock": 5,
"price": 15
}'
curl --request GET \
--url http://localhost:3000/product/1 \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MDYyNTQwNDAsImlzcyI6ImF1dGgtc2VydmljZSIsIklkIjoxLCJFbWFpbCI6ImVsb25AbXVzay5jb20ifQ.EJizTN1868TzPkGJ91NmlCA3bTWWjjEqU-cLdkbCzKg'
curl --request POST \
--url http://localhost:3000/order/ \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MDYyNTQwNDAsImlzcyI6ImF1dGgtc2VydmljZSIsIklkIjoxLCJFbWFpbCI6ImVsb25AbXVzay5jb20ifQ.EJizTN1868TzPkGJ91NmlCA3bTWWjjEqU-cLdkbCzKg' \
--header 'Content-Type: application/json' \
--data '{
"productId": 1,
"quantity": 1
}'