forked from canduma/canduma
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TEST.http
103 lines (82 loc) · 1.7 KB
/
TEST.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
###
# @name graphqli
GET http://canduma.localhost.tv:3000/
###
# @name register
POST http://canduma.localhost.tv:3000/user/register HTTP/1.1
Content-Type: application/json
{
"name": "my name",
"email": "[email protected]",
"password": "password"
}
###
# @name login
POST http://canduma.localhost.tv:3000/user/login HTTP/1.1
Content-Type: application/json
{
"email": "[email protected]",
"password": "password"
}
###
# @name getMyAccount
GET http://canduma.localhost.tv:3000/user/me HTTP/1.1
###
# @name getJwtToken
POST http://canduma.localhost.tv:3000/graphql HTTP/1.1
Content-Type: application/json
X-REQUEST-TYPE: GraphQL
query tokenQuery {
generateToken {
bearer
}
}
###
# @name decodeJwtToken
@jwtToken = {{getJwtToken.response.body.$.data.generateToken.bearer}}
POST http://canduma.localhost.tv:3000/graphql HTTP/1.1
Authorization: Bearer {{jwtToken}}
Content-Type: application/json
X-REQUEST-TYPE: GraphQL
query decodeTokenQuery {
decodeToken {
email
iss
iat
exp
sub
}
}
###
# @name listUsers
POST http://canduma.localhost.tv:3000/graphql HTTP/1.1
Authorization: Bearer {{jwtToken}}
Content-Type: application/json
X-REQUEST-TYPE: GraphQL
query ListUsers {
users {
name
userUuid
email
createdAt
}
}
###
# @name listUsers
# @return "message": "LIMIT must not be negative"
POST http://canduma.localhost.tv:3000/graphql HTTP/1.1
Authorization: Bearer {{jwtToken}}
Content-Type: application/json
X-REQUEST-TYPE: GraphQL
query ListUsers {
users(limit: -1, offset: 1) {
name
userUuid
email
createdAt
}
}
###
# @name logout
GET http://canduma.localhost.tv:3000/user/logout HTTP/1.1
###