-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.http
More file actions
33 lines (24 loc) · 1.35 KB
/
Copy pathtest.http
File metadata and controls
33 lines (24 loc) · 1.35 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
### Create user (correct credentials)
POST http://localhost:8080/api/auth
Content-Type: application/json
{
"username": "user1user1",
"password": "Lhjxb[eq1"
}
### Buy existing item
GET http://localhost:8080/api/buy/pen
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3Mzk4MTA0MjksInNJRCI6IjkzNzE1YmMzLTkwMmUtNDNhZC1hMmQxLWQ1MzY3YTJkMmRlZSIsInN1YiI6InVzZXIxdXNlcjEifQ.ne9eOkyElHL8Hi0YActm2lLTPqhqkpeyEMqdI7AWxK0
### Buy not existing item
GET http://localhost:8080/api/buy/car
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3Mzk4MTA0MjksInNJRCI6IjkzNzE1YmMzLTkwMmUtNDNhZC1hMmQxLWQ1MzY3YTJkMmRlZSIsInN1YiI6InVzZXIxdXNlcjEifQ.ne9eOkyElHL8Hi0YActm2lLTPqhqkpeyEMqdI7AWxK0
### Send coin to existing user from existing user
POST http://localhost:8080/api/sendCoin
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3Mzk4MTA0MjksInNJRCI6IjkzNzE1YmMzLTkwMmUtNDNhZC1hMmQxLWQ1MzY3YTJkMmRlZSIsInN1YiI6InVzZXIxdXNlcjEifQ.ne9eOkyElHL8Hi0YActm2lLTPqhqkpeyEMqdI7AWxK0
{
"amount": 1,
"toUser": "user1user2"
}
### Get info of existing user
GET http://localhost:8080/api/info
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3Mzk4MTA0MjksInNJRCI6IjkzNzE1YmMzLTkwMmUtNDNhZC1hMmQxLWQ1MzY3YTJkMmRlZSIsInN1YiI6InVzZXIxdXNlcjEifQ.ne9eOkyElHL8Hi0YActm2lLTPqhqkpeyEMqdI7AWxK0