Skip to content

Commit ddfc131

Browse files
update http file for testing localy
1 parent fd1fd35 commit ddfc131

File tree

1 file changed

+23
-31
lines changed

1 file changed

+23
-31
lines changed

test.http

+23-31
Original file line numberDiff line numberDiff line change
@@ -4,51 +4,47 @@
44
:host = localhost:3000
55
:appkey = key
66
:api = :http://:host
7-
:token = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIiA6ICJ3ZWJ1c2VyIiwgInVzZXJfaWQiIDogMywgImV4cCIgOiAxNTk1NjEzMTk0fQ.ahy1U_sSuSVqscdRZcp_BTth0LYdub6h9a5j2M5mwXE
87

9-
# :header = <<
10-
# apikey: :appkey
11-
# Content-Type: application/json
12-
#
13-
#
148
:header = <<
159
apikey: :appkey
1610
User-Agent: restclient/2.0
1711
Content-Type: application/json
1812

19-
#header with token
20-
:headerT = <<
21-
:header
22-
Authorization: Bearer :token
23-
24-
2513
#GET PING
2614
GET :api/
2715
:header
2816

17+
# register
18+
POST :api/rpc/register
19+
:header
20+
{
21+
"name": "alice",
22+
"email": "[email protected]",
23+
"password": "pass2",
24+
"cookie": false
25+
}
2926

30-
#GET LOGin
27+
#login
3128
POST :api/rpc/login
3229
:header
3330
{
3431
"email": "[email protected]",
35-
"password": "pass",
36-
"jwt_cookie": false,
37-
"rt_cookie": true,
38-
"csrf": false
32+
"password": "pass"
3933
}
4034

35+
:token =
36+
:refresh_token =
4137

42-
# POST register
43-
POST :api/rpc/register
38+
#header with token
39+
:headerT = <<
4440
:header
41+
Authorization: Bearer :token
42+
43+
#logout
44+
POST :api/rpc/logout
45+
:headerT
4546
{
46-
"name": "alice",
47-
"email": "[email protected]",
48-
"password": "pass2",
49-
"jwt_cookie": false,
50-
"rt_cookie": true,
51-
"csrf": false
47+
"refresh_token": :refresh_token
5248
}
5349

5450
#GET TODO
@@ -60,23 +56,20 @@ GET :api/todos
6056
GET :api/sessions
6157
:header
6258

63-
64-
6559
#GET TODO
6660
POST :api/rpc/refresh_token
6761
:header
6862
{
69-
"refresh_token": "de688895-6181-440f-a25a-8a9ba14b2162"
63+
"refresh_token": :refresh_token
7064
}
7165

7266
#Logout
7367
POST :api/rpc/logout
7468
:headerT
7569
{
76-
"refresh_token": "de688895-6181-440f-a25a-8a9ba14b2162"
70+
"refresh_token": :refresh_token
7771
}
7872

79-
8073
#GET ME
8174
GET :api/rpc/me
8275
:headerT
@@ -85,7 +78,6 @@ GET :api/rpc/me
8578
GET :api/todos?id=eq.1
8679
:headerT
8780

88-
8981
#GET TODO
9082
GET :api/todos?id=eq.2
9183
:headerT

0 commit comments

Comments
 (0)