Notification
-
Onesignal 이용 시 Content-Type header 문제Server management 2022. 5. 20. 14:51
계기 server에서 app push를 위해 onesignal rest api를 사용하는데, 이 때 Header로 'Content-Type':'application/json' 으로 설정했음에도 불구하고 onesignal에서 body를 파싱하지 못해 {"errors":["app_id not found. You may be missing a Content-Type: application/json header."]} 에러가 발생했다. 당연히 동작해야하는게 동작하지 않아 매우 많은 시간을 낭비하게 되었다. 해결 처음엔 app_id가 삭제된줄 알고 onesignal 홈페이지에서 확인했으나 아니었다. 그 다음은 메세징 기능이 바뀐건가 확인하기 위해 onesignal 홈페이지 상에서 notification을 생성하니..