JSONP

곰튀김·2022년 5월 31일
0

웹에서 axios 로 iTunes Search API 를 사용하니까 CORS 에러가 났다.

검색하다보니
Stackoverflow 에서 이런얘기가 있었다.

iTunes Search Api returns a file instead of the simple JSON. You can get the data with the help of JSONP request.You cannot call it with the fetch api.

JSONP.. 첨들었다. 이런게 있었네..
뭐 결국 라이브러리 하나 설치해서 해결하긴 했지만,
새로운걸 알게됐다.

모르는게 아직 많다!

profile
사실주의 프로그래머

0개의 댓글