fetch 에서 reject 할 때 데이터 형태 수정
Closed this issue · 1 comments
daengdaengLee commented
요약
- 현재
_fetchWithBody
함수에서_resJSON
함수로 응답 처리중 _resJSON
함수에서res.ok
에 따라resolve
또는reject
처리resolve
에서는res
객체를 JSON 형태로 변환reject
에서는res
객체 그대로 처리
요구사항
reject
처리에서도res.json()
으로 JSON 형태 데이터로 변환해서 처리$post
,$put
,$del
과 같은_fetchWithBody
사용하는 함수는 요청과 응답 모두 JSON 형태 데이터를 사용하도록 강제
daengdaengLee commented