-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathrest.http
More file actions
29 lines (23 loc) · 775 Bytes
/
rest.http
File metadata and controls
29 lines (23 loc) · 775 Bytes
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
@api = http://localhost:3000/api
@token = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlcyI6WyJhZG1pbiJdLCJfaWQiOiI1YjQ5ZDczYmEzZjQxYzFiY2U5MGNhZTciLCJlbWFpbCI6InNoeW5ldEBnbWFpbC5jb20iLCJmaXJzdE5hbWUiOiJTaGF5IiwibGFzdE5hbWUiOiJZYWlzaCIsIl9fdiI6MCwiaWF0IjoxNTYwMjg0NTE5fQ.kDKZNR0TeVLlOXcQk9HdtAMAP4I0o9EKr84n3iM2drs
### Test API
GET {{api}}/test
### Test login
POST {{api}}/login HTTP/1.1
content-type: application/json
{
"username": "shynet@gmail.com",
"password": "Aa123456"
}
### Get user profile
GET {{api}}/profile HTTP/1.1
Authorization: Bearer {{token}}
### Register an example user
POST {{api}}/register HTTP/1.1
content-type: application/json
{
"email":"johnnybravo.com",
"password": "mypass",
"firstName": "Johnny",
"lastName": "Bravo"
}