코딩쌀롱

2021.6.23(wed)_POST 요청 시 415 에러 본문

회고/하루 기록

2021.6.23(wed)_POST 요청 시 415 에러

이브✱ 2021. 6. 25. 01:14

request body의 형태가 json일 때,

headers의 Content-Type: application/json 추가해줘야 함!

 

{
  method: 'POST',
  headers: {
      'Authorization': `bearer ${token}`,
      'Content-Type': 'application/json'
  }
  body: { ... }
}
Comments