-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRest.client
45 lines (42 loc) · 1.16 KB
/
Rest.client
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
## Request login
POST http://localhost:1337/auth/local HTTP/1.1
User-Agent: rest-client
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6,zh-CN;q=0.4
Content-Type: application/json
{
"identifier": "guest@gmail.com",
"password": "123456"
}
## Response sample
HTTP/1.1 200 OK
Vary: Origin
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Frame-Options: SAMEORIGIN
X-RateLimit-Limit: 10
X-RateLimit-Remaining: 9
X-RateLimit-Reset: 1590604983
Content-Type: application/json; charset=utf-8
X-Powered-By: Strapi <strapi.io>
X-Response-Time: 230ms
Content-Length: 448
Date: Wed, 27 May 2020 18:42:02 GMT
Connection: close
{
"jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiaWF0IjoxNTkwNjA0OTIyLCJleHAiOjE1OTMxOTY5MjJ9.p4m4Wcp5HMtxgixImWGXs3oGyPBun2xnM4kEFIXq2GA",
"user": {
"id": 1,
"username": "Guest",
"email": "guest@gmail.com",
"provider": "local",
"confirmed": true,
"blocked": false,
"role": {
"id": 2,
"name": "Public",
"description": "Default role given to unauthenticated user.",
"type": "public"
},
"created_at": "2020-05-27T17:32:42.852Z",
"updated_at": "2020-05-27T17:32:42.869Z"
}
}