-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi.http
More file actions
25 lines (22 loc) · 702 Bytes
/
api.http
File metadata and controls
25 lines (22 loc) · 702 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
# Create a post
POST http://localhost:3000/posts
Content-Type: application/json
{
"title": "Naruto Shippuden",
"content": "Naruto Shippuden is a Japanese anime series based on Masashi Kishimoto's manga series.",
"category": "anime",
"tags": ["anime", "action", "adventure"]
}
### GET ALL POSTS
GET http://localhost:3000/posts
### GET SINGLE POST
GET http://localhost:3000/posts/44dcaa91-2a03-11f0-b1cb-346f24a41da4
### UPDATE
PUT http://localhost:3000/posts/44dcaa91-2a03-11f0-b1cb-346f24a41da4
Content-Type: application/json
{
"title": "Amazings things about NodeJS",
"category": "productivity"
}
### DELETE POSTS
DELETE http://localhost:3000/posts/11111111-1111-1111-1111-111111111111