-
Notifications
You must be signed in to change notification settings - Fork 0
/
client.http
82 lines (60 loc) · 1.92 KB
/
client.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
@baseUrl = http://localhost:3333
@authToken = eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI1MjE4OTc2MS1lYTQzLTQ3MTItOGZhNC03ZDczMGU4YTJmNTYiLCJpYXQiOjE3MDE0ODA4ODB9.RX28ICPB4FgtIu97ZG15HrP3Ud-dljhClAw5VSinBbaR4IGNI-LjUsvYcT93drCuaMWIi0EkH7oPM-ooX7zBNWQuvkoXzv38X8ZNMv3Yr93l3xPGboGDIY_BMjR30OFJC6dsyv_GUWe58_s9NBFHWIKm-wTQvpujqAmukDRPg3GrRogq2GQjXyib_FB5QhiW1ZVKbrgBtmj5T10P5bQWYdCLfC0WZy7WnFW_1KrZfvAQ5YZv_uvMOq7vkpR2k76giXNK91v_Go9okGJWeUNEaSKlOMPZqeVl2uEuZATdb0ht_FA_cEhbNxTOUUpNshcJjVO2IUWNyyNM-MJ6HEA-1Q
# @authToken = {{authenticate.response.body.access_token}}
# @name create_account
POST {{baseUrl}}/accounts
Content-Type: application/json
{
"name": "Jhon Doen da Silva",
"email": "johndoe2@gmail.com",
"password": "123456"
}
###
# @name authenticate
POST {{baseUrl}}/sessions
Content-Type: application/json
{
"email": "francinilton@gmail.com",
"password": "123456"
}
###
# @name create_question
POST {{baseUrl}}/questions
Content-Type: application/json
Authorization: Bearer {{authToken}}
{
"title": "Nova pergunta 76",
"content": "Conteúdo da pergunta"
}
###
# @name fetch_recents_questions
GET {{baseUrl}}/questions?page=1
Content-Type: application/json
Authorization: Bearer {{authToken}}
###
# @name delete_question
DELETE {{baseUrl}}/questions/f52ea856-93e0-41c5-bd3c-1fbc5a6444ed
Content-Type: application/json
Authorization: Bearer {{authToken}}
###
# @name answer_question
POST {{baseUrl}}/questions/f52ea856-93e0-41c5-bd3c-1fbc5a6444ed/answer
Content-Type: application/json
Authorization: Bearer {{authToken}}
{
"content": "Answer Content"
}
###
# @name answer_edit
PUT {{baseUrl}}/answers/f2e4da79-6a33-49c8-91ba-d7e0d0ef3259
Content-Type: application/json
Authorization: Bearer {{authToken}}
{
"content": "New Answer Content"
}
###
# @name fetch_answers_question
GET {{baseUrl}}/queston/f52ea856-93e0-41c5-bd3c-1fbc5a6444ed/answers
Content-Type: application/json
Authorization: Bearer {{authToken}}
###