-
Notifications
You must be signed in to change notification settings - Fork 1
/
_test.http
178 lines (125 loc) · 6.29 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
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
POST http://localhost:3000/api/v1/students HTTP/1.1
content-type: application/json
{
"firstname": "User",
"lastname": "Demo",
"email": "[email protected]",
"password": "secret"
}
###
POST http://localhost:3000/api/v1/professors HTTP/1.1
content-type: application/json
{
"firstname": "Teacher",
"lastname": "Demo",
"email": "[email protected]",
"password": "secret"
}
###
GET http://localhost:3000/api/v1/students HTTP/1.1
content-type: application/json
###
GET http://localhost:3000/api/v1/professors HTTP/1.1
content-type: application/json
###
POST http://localhost:3000/api/v1/login HTTP/1.1
content-type: application/json
{
"email": "[email protected]",
"password": "secret"
}
###
POST http://localhost:3000/api/v1/courses HTTP/1.1
content-type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImRlbW9Ad2VieGFuZGVyLmNvbSIsInBhc3N3b3JkIjoiJDJiJDEwJEZtUjZZeldmYjBoQkh1eXJWUmUwWS4yZlQuT3N3VVNUay5zUDg2Lms5alZvbnVwRnpuUHI2IiwiaWF0IjoxNTk5MTE0MzA5LCJleHAiOjE2MDM0MzQzMDl9.RwLaGKjCvmAvvrx0FvdlORgl9QTNDjOrhoNXS9QiJGM
{
"title": "Curso de PHP 2",
"professorId": 1,
"categoryId": 1,
"description": "Cursito de PHP 2"
}
###
PUT http://localhost:3000/api/v1/courses/ HTTP/1.1
content-type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImRlbW9Ad2VieGFuZGVyLmNvbSIsInBhc3N3b3JkIjoiJDJiJDEwJEZtUjZZeldmYjBoQkh1eXJWUmUwWS4yZlQuT3N3VVNUay5zUDg2Lms5alZvbnVwRnpuUHI2IiwiaWF0IjoxNTk5MTE0MzA5LCJleHAiOjE2MDM0MzQzMDl9.RwLaGKjCvmAvvrx0FvdlORgl9QTNDjOrhoNXS9QiJGM
{
"id": 1,
"title": "Curso de PHP 2",
"professorId": 1,
"categoryId": 1,
"description": "Cursito de PHP 2"
}
###
DELETE http://localhost:3000/api/v1/courses/ HTTP/1.1
content-type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImRlbW9Ad2VieGFuZGVyLmNvbSIsInBhc3N3b3JkIjoiJDJiJDEwJEZtUjZZeldmYjBoQkh1eXJWUmUwWS4yZlQuT3N3VVNUay5zUDg2Lms5alZvbnVwRnpuUHI2IiwiaWF0IjoxNTk5MTE0MzA5LCJleHAiOjE2MDM0MzQzMDl9.RwLaGKjCvmAvvrx0FvdlORgl9QTNDjOrhoNXS9QiJGM
{
"id": 1
}
###
GET http://localhost:3000/api/v1/categories/1 HTTP/1.1
content-type: application/json
###
GET http://localhost:3000/api/v1/courses/1 HTTP/1.1
content-type: application/json
###
GET http://localhost:3000/api/v1/courses/1/1 HTTP/1.1
content-type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImRlbW9Ad2VieGFuZGVyLmNvbSIsInBhc3N3b3JkIjoiJDJiJDEwJEZtUjZZeldmYjBoQkh1eXJWUmUwWS4yZlQuT3N3VVNUay5zUDg2Lms5alZvbnVwRnpuUHI2IiwiaWF0IjoxNTk5MTE0MzA5LCJleHAiOjE2MDM0MzQzMDl9.RwLaGKjCvmAvvrx0FvdlORgl9QTNDjOrhoNXS9QiJGM
###
POST http://localhost:3000/api/v1/courses/1/modules HTTP/1.1
content-type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImRlbW9Ad2VieGFuZGVyLmNvbSIsInBhc3N3b3JkIjoiJDJiJDEwJEZtUjZZeldmYjBoQkh1eXJWUmUwWS4yZlQuT3N3VVNUay5zUDg2Lms5alZvbnVwRnpuUHI2IiwiaWF0IjoxNTk5MTE0MzA5LCJleHAiOjE2MDM0MzQzMDl9.RwLaGKjCvmAvvrx0FvdlORgl9QTNDjOrhoNXS9QiJGM
{
"title": "Introducción a la Ciencias Fisicas"
}
###
PUT http://localhost:3000/api/v1/courses/1/modules HTTP/1.1
content-type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImRlbW9Ad2VieGFuZGVyLmNvbSIsInBhc3N3b3JkIjoiJDJiJDEwJEZtUjZZeldmYjBoQkh1eXJWUmUwWS4yZlQuT3N3VVNUay5zUDg2Lms5alZvbnVwRnpuUHI2IiwiaWF0IjoxNTk5MTE0MzA5LCJleHAiOjE2MDM0MzQzMDl9.RwLaGKjCvmAvvrx0FvdlORgl9QTNDjOrhoNXS9QiJGM
{
"id": 1,
"title": "Introducción a la Ciencias Fisicas II"
}
###
DELETE http://localhost:3000/api/v1/courses/1/modules HTTP/1.1
content-type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImRlbW9Ad2VieGFuZGVyLmNvbSIsInBhc3N3b3JkIjoiJDJiJDEwJEZtUjZZeldmYjBoQkh1eXJWUmUwWS4yZlQuT3N3VVNUay5zUDg2Lms5alZvbnVwRnpuUHI2IiwiaWF0IjoxNTk5MTE0MzA5LCJleHAiOjE2MDM0MzQzMDl9.RwLaGKjCvmAvvrx0FvdlORgl9QTNDjOrhoNXS9QiJGM
{
"id": 1
}
###
GET http://localhost:3000/api/v1/courses/1/modules HTTP/1.1
content-type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImRlbW9Ad2VieGFuZGVyLmNvbSIsInBhc3N3b3JkIjoiJDJiJDEwJEZtUjZZeldmYjBoQkh1eXJWUmUwWS4yZlQuT3N3VVNUay5zUDg2Lms5alZvbnVwRnpuUHI2IiwiaWF0IjoxNTk5MTE0MzA5LCJleHAiOjE2MDM0MzQzMDl9.RwLaGKjCvmAvvrx0FvdlORgl9QTNDjOrhoNXS9QiJGM
###
GET http://localhost:3000/api/v1/courses/1/1/documents HTTP/1.1
content-type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImRlbW9Ad2VieGFuZGVyLmNvbSIsInBhc3N3b3JkIjoiJDJiJDEwJEZtUjZZeldmYjBoQkh1eXJWUmUwWS4yZlQuT3N3VVNUay5zUDg2Lms5alZvbnVwRnpuUHI2IiwiaWF0IjoxNTk5MTE0MzA5LCJleHAiOjE2MDM0MzQzMDl9.RwLaGKjCvmAvvrx0FvdlORgl9QTNDjOrhoNXS9QiJGM
###
POST http://localhost:3000/api/v1/courses/1/1/documents HTTP/1.1
content-type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImRlbW9Ad2VieGFuZGVyLmNvbSIsInBhc3N3b3JkIjoiJDJiJDEwJEZtUjZZeldmYjBoQkh1eXJWUmUwWS4yZlQuT3N3VVNUay5zUDg2Lms5alZvbnVwRnpuUHI2IiwiaWF0IjoxNTk5MTE0MzA5LCJleHAiOjE2MDM0MzQzMDl9.RwLaGKjCvmAvvrx0FvdlORgl9QTNDjOrhoNXS9QiJGM
{
"title": "Introducción breve"
}
###
PUT http://localhost:3000/api/v1/courses/1/1/documents HTTP/1.1
content-type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImRlbW9Ad2VieGFuZGVyLmNvbSIsInBhc3N3b3JkIjoiJDJiJDEwJEZtUjZZeldmYjBoQkh1eXJWUmUwWS4yZlQuT3N3VVNUay5zUDg2Lms5alZvbnVwRnpuUHI2IiwiaWF0IjoxNTk5MTE0MzA5LCJleHAiOjE2MDM0MzQzMDl9.RwLaGKjCvmAvvrx0FvdlORgl9QTNDjOrhoNXS9QiJGM
{
"id": 1,
"title": "Introducción breve de PHP"
}
###
DELETE http://localhost:3000/api/v1/courses/1/1/documents HTTP/1.1
content-type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImRlbW9Ad2VieGFuZGVyLmNvbSIsInBhc3N3b3JkIjoiJDJiJDEwJEZtUjZZeldmYjBoQkh1eXJWUmUwWS4yZlQuT3N3VVNUay5zUDg2Lms5alZvbnVwRnpuUHI2IiwiaWF0IjoxNTk5MTE0MzA5LCJleHAiOjE2MDM0MzQzMDl9.RwLaGKjCvmAvvrx0FvdlORgl9QTNDjOrhoNXS9QiJGM
{
"id": 1
}
###
GET http://localhost:3000/api/v1/courses/1/1/1 HTTP/1.1
content-type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImRlbW9Ad2VieGFuZGVyLmNvbSIsInBhc3N3b3JkIjoiJDJiJDEwJEZtUjZZeldmYjBoQkh1eXJWUmUwWS4yZlQuT3N3VVNUay5zUDg2Lms5alZvbnVwRnpuUHI2IiwiaWF0IjoxNTk5MTE0MzA5LCJleHAiOjE2MDM0MzQzMDl9.RwLaGKjCvmAvvrx0FvdlORgl9QTNDjOrhoNXS9QiJGM
###