-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclient.http
More file actions
40 lines (32 loc) · 747 Bytes
/
client.http
File metadata and controls
40 lines (32 loc) · 747 Bytes
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
@baseUrl = http://localhost:3333
@authToken = {{authentication.response.body.access_token}}
# @name create_account
POST {{baseUrl}}/accounts
Content-Type: application/json
{
"name": "Usuario Teste",
"email": "usuariotest@gmail.com",
"password": "123456"
}
###
# @name authentication
POST {{baseUrl}}/sessions
Content-Type: application/json
{
"email": "usuariotest@gmail.com",
"password": "123456"
}
###
# @name create_question
POST {{baseUrl}}/questions
Content-Type: application/json
Authorization: Bearer {{authToken}}
{
"title": "Pergunta teste3!!",
"content": "Conteúdo teste"
}
###
# @name fetch_questions
GET {{baseUrl}}/questions?page=1
Content-Type: application/json
Authorization: Bearer {{authToken}}