-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrestClient.http
129 lines (101 loc) · 3.08 KB
/
restClient.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
@hostname = localhost
@entryPoint = http://{{hostname}}:4200/api/v1
@accessToken = Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImlkIjo0LCJ1c2VybmFtZSI6Ill1bWkiLCJlbWFpbCI6ImNvbnRhY3RAeXVtaWNvZGUubmV0Iiwicm9sZSI6ImFkbWluIn0sImlhdCI6MTY5MzA1OTA3NSwiZXhwIjoxNjkzMTQ1NDc1fQ.7t2zF7mRqEf022e7nz8xmx3up475ejbwh14j9v_O8Mw
@refreshToken = Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImlkIjo0LCJ1c2VybmFtZSI6Ill1bWkiLCJlbWFpbCI6ImNvbnRhY3RAeXVtaWNvZGUubmV0Iiwicm9sZSI6ImFkbWluIn0sImlhdCI6MTY5NzY1NzQ4MSwiZXhwIjoxNjk3ODMwMjgxfQ.ymETf7a7zgbxT7fJnI7Alef0WqsfVD1nuhyPMF2zifo
#& -----------------------------------------------
#~ ------------------------------------------ USER
#& -----------------------------------------------
#~ ------------------------ doSignUp
###
POST {{entryPoint}}/signup
Content-Type: application/json
{
"username": "Yumii",
"email": "test@yumicode.net",
"password": "N6y$Ozddzt=1aa",
"passwordConfirm": "N6y$Ozddzt=1aa"
}
#~ ------------------------ doSignIn
###
POST {{entryPoint}}/signin
Content-Type: application/json
{
"email": "contact@yumicode.net",
"password": "N6y$Ozddzt=1aa"
}
#~ ------------------------ doSignOut
###
GET {{entryPoint}}/signout
Content-Type: application/json
{{refreshToken}}
#^ ------------------------ fetchAllUsers
###
GET {{entryPoint}}/users
Content-Type: application/json
{{accessToken}}
#^ ------------------------ fetchAllUsersMongo
###
GET {{entryPoint}}/usersmongo
Content-Type: application/json
{{accessToken}}
#^ ------------------------ fetchOneUser
###
GET {{entryPoint}}/users/3
Content-Type: application/json
{{accessToken}}
#^ ------------------------ updateUser
###
PATCH {{entryPoint}}/users/4
Content-Type: application/json
{{accessToken}}
{
"first_name": "Yumedo"
}
#^ ------------------------ deleteUser
###
DELETE {{entryPoint}}/users/2
Content-Type: application/json
{{accessToken}}
#^ ------------------------ refreshToken
###
POST {{entryPoint}}/refreshToken
Content-Type: application/json
{{refreshToken}}
#& -----------------------------------------------
#~ --------------------------------------- ARTICLE
#& -----------------------------------------------
#^ ------------------------ createArticle
###
POST {{entryPoint}}/articles
Content-Type: application/json
{{accessToken}}
{
"title": "Super article !",
"abstract": "Description de mon article",
"content": "Ceci est mon article"
}
#^ ------------------------ fetchAllArticles
###
GET {{entryPoint}}/users/12/articles
Content-Type: application/json
{{accessToken}}
#^ ------------------------ fetchOneArticle
###
GET {{entryPoint}}/users/12/articles/14
Content-Type: application/json
{{accessToken}}
#^ ------------------------ updateArticle
###
PATCH {{entryPoint}}/articles/12
Content-Type: application/json
{{accessToken}}
{
"title": "Super article modifiééééééé !",
"abstract": "Description de mon article modifié",
"content": "Ceci est mon article modifié"
}
#^ ------------------------ deleteArticle
###
DELETE {{entryPoint}}/articles/13
Content-Type: application/json
{{accessToken}}