forked from ipenywis/nestjs-solid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpostman.curl.http
46 lines (40 loc) · 1.01 KB
/
postman.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
@BASE_URL_DEV=http://localhost:9000
@BASE_URL={{BASE_URL_DEV}}
#### https://marketplace.visualstudio.com/items?itemName=humao.rest-client
# @name login
curl -X 'POST' \
'{{BASE_URL}}/auth/login' \
-H 'Content-Type: application/json'
-d '{
"requestId": "{{$guid}}",
"randomInt": {{$randomInt 10 999}},
"yesterday": {{$timestamp -2 d}},
"tomorrow": {{$timestamp 2 d}},
"customDate": "{{$datetime 'YYYY-MM-DD'}}",
"datetime": "{{$datetime iso8601 -1 d}}",
"email": "[email protected]",
"password": "123456"
}'
# {
# requestId: 'ed74aef7-91f8-482b-9a36-f67af9412ddf',
# randomInt: 881,
# yesterday: 1695975154,
# tomorrow: 1696320754,
# customDate: '2023-10-01',
# datetime: '2023-09-30T08:12:34.633Z',
# email: '[email protected]',
# password: '123456'
# }
@JWT = {{login.response.body.accessToken}}
####
curl -X 'GET' \
'{{BASE_URL}}'
####
curl -X 'POST' \
'{{BASE_URL}}/orders' \
-d '{
"productId": 1
}'
####
curl -X 'GET' \
'{{BASE_URL}}/LSP/orders/pricing/2'