-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest-api.http
60 lines (46 loc) · 1.21 KB
/
test-api.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
### POST register user
POST http://localhost:8000/api/register
Content-Type: application/json
{
"first_name": "a",
"last_name": "A",
"email": "youremail@gmail.com",
"password": "qwe",
"password_confirm": "qwe"
}
### POST login user
POST http://localhost:8000/api/login
Content-Type: application/json
{
"email": "youremail@gmail.com",
"password": "a"
}
> {% client.global.set("auth_token", response.body.token); %}
### POST refresh token
POST http://localhost:8000/api/refresh
> {% client.global.set("auth_token", response.body.token); %}
### Get user auth
GET http://localhost:8000/api/user
Authorization: Bearer {{auth_token}}
### POST user logout
POST http://localhost:8000/api/logout
### POST forgot password
POST http://localhost:8000/api/forgot
Content-Type: application/json
{
"email": "youremail@gmail.com"
}
### Get test CORS
GET http://localhost:8000/api/user
Authorization: Bearer {{auth_token}}
Origin: http://localhost:4200
Access-Control-Request-Method: GET
### POST Reset password
POST http://localhost:8000/api/reset/your_reset_password_token
Origin: http://localhost:4200
Access-Control-Request-Method: POST
Content-Type: application/json
{
"password": "asd",
"password_confirm": "asd"
}