-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.http
41 lines (30 loc) · 953 Bytes
/
api.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
### Get all Tod@os
GET http://localhost:3000/todo
### Create todo
POST http://localhost:3000/todo
Content-type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiSm9hbyIsImlhdCI6MTY3MDc5OTI0MiwiZXhwIjoxNjcwODAyODQyfQ.7ToYhdw-cUvK5kKx5H-XMo3EZ4pEq7DprMM-WVk-okI
{
"message": "se4"
}
### Register User
POST http://localhost:3000/auth/register
Content-type: application/json
{
"name": "Joao",
"email": "[email protected]",
"password": "password"
}
### Login
POST http://localhost:3000/auth/login
Content-type: application/json
{
"email": "[email protected]",
"password": "password"
}
### Test auth guard
POST http://localhost:3000/auth/test
Content-type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYzOGU0ZGUxNTcxNzJlMDAyYmE5MWFiMyIsIm5hbWUiOiJKb2FvIiwiaWF0IjoxNjcwMjcxNjAyLCJleHAiOjE2NzAyNzUyMDJ9.Ienko-3Hzsv7kd4StdWldMajVVUa1O0rntOYx6BcZBY
{
}