• 카테고리

    질문 & 답변
  • 세부 분야

    프론트엔드

  • 해결 여부

    미해결

디테일 페이지

22.08.02 19:47 작성 조회수 152

0

useParams로 id를 가져왔는데 그다음 가져온 id에 맞는 이미지나 정보는 어떻게 가져와야 될까요...?

답변 2

·

답변을 작성해보세요.

0

김동규님의 프로필

김동규

질문자

2022.08.04

감사합니다!

0

안녕하세요 

이 api를 이용하시면 각각의 영화 디테일 정보를 가져올 수 있습니다 

https://developers.themoviedb.org/3/movies/get-movie-details

path parameter 값으로 movie_id를 받고있죠 

url 끝에 영화id값을 넣어주시고 api호출해주시면 됩니다 

hheo97님의 프로필

hheo97

2022.11.08

위 api로 id를 넣고 호출하면 아래와 같은 error가 납니다

Access to fetch at 'https://developers.themoviedb.org/3/movies/get-movie-details/movies/663712' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

어느 부분이 잘못 된 것 인지 알려주세요