-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathclient.http
131 lines (98 loc) · 3.29 KB
/
client.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
@baseUrl = http://localhost:4000/api/pl8s
@id = 60a8e493018286dd93cb188a
@token = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtOElkIjoiNjBhOGY0NWU0NDYyYTY2ZTY4OTQ3YTVlIiwiaWF0IjoxNjIxNjg1MzUzLCJleHAiOjE2MjE3Mjg1NTN9.Ox4VnYgE1_f8dsPDm7lnpOkKGvwWKmit9vVjYrmqhqo
@m8Id = 60a8f45e4462a66e68947a5e
GET {{baseUrl}}
###
GET {{baseUrl}}/{{id}}
###
POST http://localhost:4000/api/become-a-m8
content-type: application/json
{
"username": "Devante",
"email": "newUser@email1",
"avatar": "https://i2-prod.liverpoolecho.co.uk/incoming/article15973166.ece/ALTERNATES/s615/53766573_466516517491863_242613266507890688_n.jpg",
"password": "password",
"passwordConfirmation": "password",
"m8s": [],
"highScore": 0,
"r8dPl8s": []
}
###
POST http://localhost:4000/api/login
content-type: application/json
{
"email": "newUser@email1",
"password": "password"
}
###
GET {{baseUrl}}/search?description=meaty
###
POST http://localhost:4000/api/login
content-type: application/json
{
"email": "devante@email",
"password": "password"
}
###
POST {{baseUrl}}
Content-Type: application/json
Authorization: Bearer {{token}}
{
"name": "test",
"origin": "test",
"description": "test",
"image": "test",
"ingredients": ["test"],
"recipe": ["test"],
"prepTime": 10,
"cookTime": 10
}
###
{
"email": "dom@dom",
"password": "dom"
}
GET http://localhost:4000/api/m8s/{{m8Id}}
# Content-Type: application/json
# Authorization: Bearer {{token}}
###
DELETE {{baseUrl}}/60a8d96b1aa94c6339385b09
Authorization: Bearer {{token}}
###
PUT http://localhost:4000/api/m8/60a91fa365ab025de982a434
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtOElkIjoiNjBhYjc0OTVhYWQ1MzIwZDEwNjRjZTVjIiwiaWF0IjoxNjIxOTQ4NDY3LCJleHAiOjE2MjE5OTE2Njd9.Q9v_bTrumMvxb4IIOmeC-r--cyKKjBSj575rAZ6DUbI
Content-Type: application/json
{
"username": "New name",
"bio": "new bio"
}
###
PUT http://localhost:4000/api/m8s/{{m8Id}}
Content-Type: application/json
Authorization: Bearer {{token}}
###
POST http://localhost:4000/api/pl8/60ab7496aad5320d1064ce5e/comment
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtOElkIjoiNjBhYjc0OTVhYWQ1MzIwZDEwNjRjZTVjIiwiaWF0IjoxNjIxOTQ4NDY3LCJleHAiOjE2MjE5OTE2Njd9.Q9v_bTrumMvxb4IIOmeC-r--cyKKjBSj575rAZ6DUbI
Content-Type: application/json
{
"text": "this is another new comment"
}
###
PUT {{baseUrl}}/60acf7d62cfaac7979ac9cac/r8ings/60acf81c23f86e79953136ee
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtOElkIjoiNjBhY2Y3ZDYyY2ZhYWM3OTc5YWM5Y2FhIiwiaWF0IjoxNjIxOTQ4MzkzLCJleHAiOjE2MjE5OTE1OTN9.cejf4yafuwwW8zTJJzEoKgjSpAgTp7F73wbBildEK40
content-type: application/json
{
"r8ing": 5
}
###
PUT http://localhost:4000/api/pl8/60ab7496aad5320d1064ce5e/comment/60acf904156716642a8789b2
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtOElkIjoiNjBhYjc0OTVhYWQ1MzIwZDEwNjRjZTVjIiwiaWF0IjoxNjIxOTQ4NDY3LCJleHAiOjE2MjE5OTE2Njd9.Q9v_bTrumMvxb4IIOmeC-r--cyKKjBSj575rAZ6DUbI
content-type: application/json
{
"text": "This comment was updated with PUT"
}
###
DELETE http://localhost:4000/api/pl8/60ab7496aad5320d1064ce5e/comment/60acf904156716642a8789b2
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtOElkIjoiNjBhYjc0OTVhYWQ1MzIwZDEwNjRjZTVjIiwiaWF0IjoxNjIxOTQ4NDY3LCJleHAiOjE2MjE5OTE2Njd9.Q9v_bTrumMvxb4IIOmeC-r--cyKKjBSj575rAZ6DUbI
content-type: application/json