🖥️게시물 CRUD API
게시물 작성 API
POST
localhost:3000/api/posts
Request Body
Name
Type
Description
title*
string
title of the post
content*
string
content of the post
{
message:"게시물 작성에 성공하였습니다."
}
게시물 전체 조회 API
GET
localhost:3000/api/posts
{ posts }
게시물 상세 조회 API
GET
localhost:3000/api/posts/:postId
Path Parameters
Name
Type
Description
postId*
String
postId of the post
{
post
}
게시물 수정 API
PATCH
localhost:3000/api/posts/:postId
Path Parameters
Name
Type
Description
postId*
String
postId of the post
Request Body
Name
Type
Description
title*
String
title of the post
content*
String
content of the post
{
message:"게시물 수정에 성공하였습니다."
}
게시물 삭제 API
DELETE
localhost:3000/api/posts/:postId
Path Parameters
Name
Type
Description
postId*
String
postId of the post
{
message:"게시물 삭제에 성공하였습니다."
}
Last updated