-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi.http
44 lines (36 loc) · 1.1 KB
/
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
@baseUrl = http://localhost:3000
@token = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiaWF0IjoxNjE5NjI1NTk2LCJleHAiOjE2MTk3MTE5OTZ9.PhImK7gn87y0h3eup4lKCt0ig5IWKhebZ2Yot4ped98
########################################################################
########### USER ###########
########################################################################
### Login (with fixture user)
POST {{baseUrl}}/user/login HTTP/1.1
Accept: application/json
Content-Type: application/json
{
"email": "msmith@fixture.example.com",
"password": "secret"
}
### Login (with created user)
POST {{baseUrl}}/user/login HTTP/1.1
Accept: application/json
Content-Type: application/json
{
"email": "test@example.com",
"password": "secret"
}
### Register
POST {{baseUrl}}/user/register HTTP/1.1
Accept: application/json
Content-Type: application/json
{
"email": "test@example.com",
"firstName": "John",
"lastName": "Doe",
"password": "secret"
}
### Get user by id
GET {{baseUrl}}/user/1 HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer {{token}}