-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclient.http
53 lines (42 loc) · 1.12 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
@baseUrl = http://localhost:3333
@authToken = {{authenticate.response.body.access_token}}
# @name create_account
POST {{baseUrl}}/accounts
Content-Type: application/json
{
"name":"John Doe",
"email":"[email protected]",
"password": "123456"
}
###
# @name authenticate
POST {{baseUrl}}/sessions
Content-Type: application/json
{
"email":"[email protected]",
"password": "123456"
}
###
# @name create_question
POST {{baseUrl}}/questions
Content-Type: application/json
Authorization: Bearer {{authToken}}
{
"title":"Question 2 title *@#D",
"content": "Some Question Content"
}
###
# @name fetch_recent_questions
GET {{baseUrl}}/questions?page=1
Content-Type: application/json
Authorization: Bearer {{authToken}}
###
# @name upload_attachments
POST {{baseUrl}}/attachments
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
Authorization: Bearer {{authToken}}
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="file"; filename="sample-uppload.jpeg"
Content-Type: image/jpeg
< ./test/e2e/sample-uppload.jpeg
------WebKitFormBoundary7MA4YWxkTrZu0gW--