강의

멘토링

커뮤니티

Inflearn Community Q&A

hght123007's profile image
hght123007

asked

(2025 Latest Update) React: The Final Step to Becoming a Frontend Developer

20. Fourth Portfolio Project

디테일 페이지

Written on

·

270

0

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

reactreduxweb-api

Answer 2

0

hght123007님의 프로필 이미지
hght123007
Questioner

감사합니다!

0

안녕하세요 

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

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

path parameter 값으로 movie_id를 받고있죠 

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

위 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.

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

 

hght123007's profile image
hght123007

asked

Ask a question