generated from lajanzen/vite-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsample.http
43 lines (35 loc) · 912 Bytes
/
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
### Request all users
GET http://localhost:6007/api/users HTTP/1.1
Accept: application/json
### Request a single user
GET http://localhost:6007/api/users/user@mail.com HTTP/1.1
Accept: application/json
### Add new user
POST http://localhost:6007/api/users HTTP/1.1
Content-Type: application/json
{
"name": "daniel",
"email": "user@mail.com",
"phone": "5123456",
"city": "Cologne",
"experience": "professional",
"password": "ilovedogs123",
"photo": "string"
}
### Correct login
POST http://localhost:6007/api/users/login HTTP/1.1
Content-Type: application/json
{
"email": "bibi@mail.com",
"password": "ilovedogs123"
}
### Incorrect login
POST http://localhost:6007/api/users/login HTTP/1.1
Content-Type: application/json
{
"email": "bla@mail.com",
"password": "wrong"
}
### LoggedIn User
GET http://localhost:6007/api/users/me HTTP/1.1
Accept: application/json