Open jaehunjung1 opened 4 years ago
POST and PUT requests should contain data using the JSON format in the body of the request. For each model, the JSON format should look like:
User : {username: string, password: string}
Article : {title: string, content: string}
Comment : {content: string}
혹 이 부분이 post, put request의 body라고 이해하면 되는건가요?!
아니요 comment가 어떤 article에 대한 comment 인지는 변경 불가능합니다 밑에 댓글처럼 body가 content만 포함된다고 생각하시면 되구요 그냥 단순하게 생각해도 웹 서비스에서 댓글 옮기기가 가능하면 조금 이상하겠죠...? 🙂
감사합니다!!!
Comment에 대한 PUT method를 수행할때, comment가 어떤 article에 대한 comment인지도 변경 가능한 대상인가요? 만약 그렇다면, put request의 body에 article에 대한 수정 사항이 어떠한 형식으로 오게 되나요? (e.g. {'article': article_id, ...} 등)
감사합니다!