-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclient.http
More file actions
38 lines (32 loc) · 725 Bytes
/
client.http
File metadata and controls
38 lines (32 loc) · 725 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
@baseUrl = http://localhost:3333
@authToken = {{authenticate.response.body.access_token}}
# @name create_account
POST {{baseUrl}}/accounts
Content-Type: application/json
{
"name": "Joao Medeiros",
"email": "joao.medeiros@example.com",
"password": "123456"
}
###
# @name authenticate
POST {{baseUrl}}/sessions
Content-Type: application/json
{
"email": "joao.medeiros@example.com",
"password": "123456"
}
###
# @name create_question
POST {{baseUrl}}/questions
Content-Type: application/json
Authorization: Bearer {{authToken}}
{
"title": "Nova Pergunta",
"content": "Conteúdo teste"
}
###
# @name fetch_recent_questions
GET {{baseUrl}}/questions
Content-Type: application/json
Authorization: Bearer {{authToken}}