-
Notifications
You must be signed in to change notification settings - Fork 0
/
apitest.http
53 lines (33 loc) · 1.16 KB
/
apitest.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
### define
@baseurl=http://localhost:8080/api
@userid=662f968131842af60afd8995
@useridfake = 6629941c37599f2566aad0ee
### Pinging the server
GET {{baseurl}}/ping
### posting new user details
POST {{baseurl}}/users?action=create
Content-Type: application/json
{
"name": "Niranjan Awati",
"email": "[email protected]",
"telegid": 645654677,
"auth": "jun%41993"
}
### authenticating a user
POST {{baseurl}}/users?action=auth
Content-Type: application/json
{
"email": "[email protected]",
"auth": "jun%41993"
}
### authorization user
GET {{baseurl}}/users?action=auth
Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MTQwMDE3NDYsImlzcyI6InBhdGlvLXdlYiBzZXJ2ZXIiLCJzdWIiOiJVc2VyIGF1dGhvcml6YXRpb24gcmVxdWVzdCIsInVzZXIiOiJrbmVlcnVuanVuQGdtYWlsLmNvbSIsInVzZXItcm9sZSI6Mn0.ZqRIr0QK5yT37UldsSejO7DYgOnqRVG9MSb9csRk0Bk
### getting simple user details
GET {{baseurl}}/users/{{userid}}
### deleting a simple user
DELETE {{baseurl}}/users/{{userid}}
### getting a user details that does not exists
GET {{baseurl}}/users/{{useridfake}}
### trying to delete a user that does not exists
DELETE {{baseurl}}/users/{{useridfake}}