issues
search
Cocktail-Masters
/
Banana-Vote-FE
https://bvote.co.kr
4
stars
3
forks
source link
204 No Content에 대한 처리 책임은 누가?
#177
Closed
win9612
closed
1 year ago
win9612
commented
1 year ago
문제
204 No Content
status code를 받을 경우, 에러는 아니지만 data로
빈 문자열
을 받게 됨.
하지만 정해진 resposne data 형식과 달라 문제 발생
두 가지를 생각해 볼 수 있다.
백엔드
가 정해진 형식에 맞춰 빈 객체를 리턴해야 하는가?
프론트엔드
가 204를 확인하면 직접 빈 객체를 만들어 처리해야 하는가?
결론
프론트엔드가 204 코드를 확인하면 빈 객체를 만들어 리턴하기로 했다.
참고 링크
https://ts2ree.tistory.com/m/144
문제
204 No Content
status code를 받을 경우, 에러는 아니지만 data로빈 문자열
을 받게 됨.백엔드
가 정해진 형식에 맞춰 빈 객체를 리턴해야 하는가?프론트엔드
가 204를 확인하면 직접 빈 객체를 만들어 처리해야 하는가?결론
참고 링크
https://ts2ree.tistory.com/m/144