generated from welschoff/vite-with-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsamples.http
76 lines (44 loc) · 1.24 KB
/
samples.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
71
72
73
74
75
76
### GET all users
GET http://localhost:3001/api/users HTTP/1.1
### GET watchlist
GET http://localhost:3001/api/watchlist/Hendrik HTTP/1.1
### GET users without logged User
GET http://localhost:3001/api/friends/Fabi HTTP/1.1
### Login a user
POST http://localhost:3001/api/login HTTP/1.1
Content-Type: application/json
{
"username": "Hendrik",
"password": "neuefische"
}
### LOGOUT
GET http://localhost:3001/api/logout HTTP/1.1
### GET popular series
GET http://localhost:3001/api/popular HTTP/1.1
### SEARCH series
GET http://localhost:3001/api/search/:name HTTP/1.1
### GET Details
GET http://localhost:3001/api/detail HTTP/1.1
### POST series to Watchlist
POST http://localhost:3001/api/watchlist HTTP/1.1
Content-Type: application/json
{
"name": "Squid Game"
}
### PATCH a new series set to a user
PATCH http://localhost:3001/api/users/Hendrik HTTP/1.1
Content-Type: application/json
{
"vote_average": 7,
"poster_path": "test"
}
### Delete a series from watchlist
PUT http://localhost:3000/api/users/Hendrik HTTP/1.1
Content-Type: application/json
{
"poster_path": "test"
}
### Get logged in user
GET http://localhost:3000/api/me HTTP/1.1
### GET a single user
GET http://localhost:3000/api/users/Hendrik HTTP/1.1