향해 12기 CRUD / JWT 로그인 기능 과제 23.02.17 - 23.02.24
로그인을 하고, 블로그에 이미지와 글을 모두 작성해보세요!
[작성중]
Number | Method | URL | Description | Request | Response |
---|---|---|---|---|---|
1 | POST |
/blog | 글작성 | { postTitle: ‘제목, postDate: 2023년 01월 01일, postAutor: ‘작성자’, postContent: ‘본문내용’, postId: id, } | { ”ok”:true } |
2 | GET |
/blog | 홈 글 전체 조회 | - | { ”ok”:true, postCategory: ‘카테고리’, postTitle: ‘제목’, postDate: 2023년 01월 01일, postAutor: ‘작성자’, postContent: ‘본문내용’ } |
3 | PUT |
/blog/{id} | 글 수정 | { postTitle: ‘제목’, postContent: ‘본문내용’, } | - |
4 | GET |
/blog/{id} | 디테일 글 조회 | - | { ”ok”:true, postTitle: ‘제목’, postContent: ‘본문내용’ } |
5 | DELETE |
/blog/{id} | 글 삭제 | - | - |
6 | POST |
register | body id: string password: string |
201 없음 | |
7 | POST |
login | body id: string password: string |
201 token: string { "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImtvYjIxMDAiLCJpYXQiOjE2NzI3NTUyMjMsImV4cCI6MTY3Mjc1NTI4M30.aVVgNMb69m4HQ_OxkJ9Rpd5or98OnEMU8SajJZvNnkk" } | |
8 | GET |
login | header authorization: string ex) authorization : Bearer asdffsfsdfafljeope |
header authorization: string ex) authorization : Bearer asdffsfsdfafljeop |