-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.http
70 lines (56 loc) · 1.69 KB
/
test.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
GET http://localhost:3000/recipes HTTP/1.1
content-type: application/json
###
POST http://localhost:3000/recipes HTTP/1.1
content-type: application/json
{
"name": "Homemade Pizza",
"tags" : ["pizza", "dinner"],
"ingredients": [
"1 1/2 cups (355 ml) warm water (105°F-115°F)",
"1 package (2 1/4 teaspoons) of active dry yeast",
"3 3/4 cups (490 g) bread flour",
"feta cheese, firm mozzarella cheese, grated"
],
"instructions": [
"Step 1.",
"Step 2.",
"Step 3."
]
}
###
PUT http://localhost:3000/recipes/co7c8o1clfl5fc6dhtt0 HTTP/1.1
content-type: application/json
{
"name": "Homemade Pizza #2",
"tags" : ["italian", "pizza", "dinner"],
"ingredients": [
"1 1/2 cups (355 ml) warm water (105°F-115°F)",
"1 package (2 1/4 teaspoons) of active dry yeast",
"3 3/4 cups (490 g) bread flour",
"feta cheese, firm mozzarella cheese, grated"
],
"instructions": [
"Step 1.",
"Step 2.",
"Step 3."
]
}
###
DELETE http://localhost:3000/recipes/661025abe5baa013b0546695 HTTP/1.1
content-type: application/json
###
GET http://localhost:3000/recipes/search?tag=pizza HTTP/1.1
content-type: application/json
###
POST http://localhost:3000/signin HTTP/1.1
content-type: application/json
{
"username": "admin",
"password": "fCRmh4Q2J7Rseqkz"
}
###
POST http://localhost:3000/refresh HTTP/1.1
content-type: application/json
Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiZXhwIjoxNzEyNDI1NjM4fQ.ChU-H93lwQwqqGUu2z82_P3VIGUxG53gSwA6S7fa9AY
{"name": "Homemade Pizza","tags" : ["pizza", "dinner"],"ingredients": [],"instructions":[]}