-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathhttp.http
More file actions
62 lines (49 loc) · 1.13 KB
/
http.http
File metadata and controls
62 lines (49 loc) · 1.13 KB
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
## User rest
### POST user
POST http://localhost:8080/user
Content-Type: application/json
{
"username": "nome",
"password": "password"
}
### POST login
# @name login
POST http://localhost:8080/login
Content-Type: application/json
{
"username": "nome",
"password": "password"
}
## após fazer o request de login, substitua a variável abaixo com o valor do token retornado
###
@access_token = {{login.response.body.*}}
## Todo-list rest
# POST todo-list
POST http://localhost:8080/
Content-Type: application/json
Authorization: bearer {{access_token}}
{
"title": "atividades do dia 2",
"description": "lavar cassa, fazer o almoco",
"done": false
}
###
# GET /all/todo-list
GET http://localhost:8080/
Authorization: bearer {{access_token}}
###
# GET /todo-list/id
GET http://localhost:8080/8
Authorization: bearer {{access_token}}
### PUT /todo-list/id
PUT http://localhost:8080/8
Content-Type: application/json
Authorization: bearer {{access_token}}
{
"title": "atividades do dia",
"description": "fazer atividade de ingles",
"done": true
}
### DELETE /todo-list/id
DELETE http://localhost:8080/8
Authorization: bearer {{access_token}}