-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathendpoints.http
49 lines (34 loc) · 855 Bytes
/
endpoints.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
### Create single recipe
POST http://localhost:8080/v1/recipes HTTP/1.1
content-type: application/json
{
"recipe_name": "sample",
"brew_method": "chemex",
"coffee_weight": 20.0,
"weight_unit": "g",
"grind_size": 21,
"water_weight": 500.0,
"water_unit": "g",
"user_id": 5
}
### Get single recipe
GET http://localhost:8080/v1/recipes/1 HTTP/1.1
### Get recipes
GET http://localhost:8080/v1/recipes HTTP/1.1
### Create user
POST http://localhost:8080/v1/users HTTP/1.1
content-type: application/json
{
"name": "sample",
"email": "[email protected]",
"password": "password"
}
### Save recipe to user
POST http://localhost:8080/v1/save-recipe HTTP/1.1
content-type: application/json
{
"user_id": 1,
"recipe_id": 4
}
### Get user with saved recipes
GET http://localhost:8080/v1/users/1 HTTP/1.1