generated from Dev-dfm/boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 1
/
sample.http
70 lines (55 loc) · 1.27 KB
/
sample.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
@port = {{$dotenv PORT}}
@baseUrl = http://localhost:{{port}}
### Request all groups
GET {{baseUrl}}/api/groups
Content-Type: application/json
### Request group
GET {{baseUrl}}/api/groups/Boxing Panda
Content-Type: application/json
### Add new group
POST {{baseUrl}}/api/groups HTTP/1.1
Content-Type: application/json
{
"groupname": "Boxing",
"sport": "Boxing",
"date": "2021/Jan/17",
"time": "18:00",
"location": "Aachener Weiher",
"limit": 10,
"equipment": "Boxing gloves",
"description": "Have fun"
}
### Delete group
DELETE {{baseUrl}}/api/groups/Boxing
# USERS
### Request all users
GET {{baseUrl}}/api/users
Content-Type: application/json
### Request user
GET {{baseUrl}}/api/users/Jonni
Content-Type: application/json
### Add new user
POST {{baseUrl}}/api/users HTTP/1.1
Content-Type: application/json
{
"userName": "Jonni",
"email": "[email protected]",
"password": "123",
"confirmPassword": "123"
}
### Delete a user
DELETE {{baseUrl}}/api/users/Jonni
### Correct login
POST {{baseUrl}}/api/users/login HTTP/1.1
Content-Type: application/json
{
"email": "[email protected]",
"password": "123"
}
### Incorrect login
POST {{baseUrl}}/api/users/login HTTP/1.1
Content-Type: application/json
{
"email": "[email protected]",
"password": "789"
}