-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrest.http
More file actions
68 lines (46 loc) · 1.12 KB
/
rest.http
File metadata and controls
68 lines (46 loc) · 1.12 KB
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
### Home
GET http://localhost:1202
### Register User
POST http://localhost:1202/api/auth/register
Content-Type: application/json
{
"name": "user1",
"email": "user1@mail.com",
"password": "123456"
}
### Login User
POST http://localhost:1202/api/auth/login
Content-Type: application/json
{
"email": "ashish@example.com",
"password": "123456"
}
### Login User
POST http://localhost:1202/api/auth/login
Content-Type: application/json
{
"email": "user1@mail.com",
"password": "123456"
}
### Create Note
POST http://localhost:1202/api/notes
Content-Type: application/json
{
"title": "third user third mote",
"content": "third note content"
}
### Get My Notes
GET http://localhost:1202/api/notes
### Get Single Note
GET http://localhost:1202/api/notes/69c5c38d97a0598f63f6a927
### Update Note
PUT http://localhost:1202/api/notes/69c5c38d97a0598f63f6a927
Content-Type: application/json
{
"title": "Updated second Note Title",
"content": "Updated second note note content"
}
### Delete Note
DELETE http://localhost:1202/api/notes/69c5c38d97a0598f63f6a927
### Logout User
POST http://localhost:1202/api/auth/logout