-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexample.http
51 lines (38 loc) · 943 Bytes
/
example.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
@hostname = localhost
@port = 8080
@host = http://{{hostname}}:{{port}}
@user_id = 123
@authToken = token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXNzd29yZCI6IjEyMjM0NCIsInVzZXJuYW1lIjoidGVzdCJ9.KL2a9xW-8iJadE778n-_wRZTy1Md1NuMtmVKc1puQI4
# test GetUser
GET {{host}}/user/{{user_id}} HTTP/1.1
Authorization: {{authToken}}
###
PUT {{host}}/user/{{user_id}} HTTP/1.1
Content-Type: text/plain
Authorization: {{authToken}}
{
"username": "example",
"first_name": "example_first",
"last_name": "example_last",
"age": 24
}
###
DELETE {{host}}/user/{{user_id}} HTTP/1.1
Authorization: {{authToken}}
###
CREATE {{host}}/user/ HTTP/1.1
Content-Type: text/plain
Authorization: {{authToken}}
{
"username": "example",
"first_name": "example_first",
"last_name": "example_last",
"age": 24
}
###
POST {{host}}/auth/login HTTP/1.1
Content-Type: text/plain
{
"username": "test",
"password": "122344"
}