인프런 커뮤니티 질문&답변

김재기님의 프로필 이미지

작성한 질문수

리액트 처음이시라구요? React JS로 웹 서비스 만들기!

Async Await

fetch problem

18.09.22 14:13 작성

·

473

0

if I use fetch, I have a problem like below.. what am I going to do???

Failed to load https://yts.ag/api/v2/list_movies.json?sort_by=rating: Redirect from 'https://yts.ag/api/v2/list_movies.json?sort_by=rating' to 'https://yts.am/api/v2/list_movies.json?sort_by=rating' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

App.js:33 TypeError: Failed to fetch

답변 5

1

권기현님의 프로필 이미지

2020. 02. 05. 15:05

1

devham76님의 프로필 이미지

2019. 11. 27. 18:25

https://yts.lt/api/v2/list_movies.json?sort_by=rating
로 또 변경되었습니다

1

지태님의 프로필 이미지

2019. 03. 30. 14:33

윤이응씨 고마워요~!

1

윤이응님의 프로필 이미지

2019. 03. 27. 04:25

that movie database server url has changed. so you should change your url like 'https://yts.am/api/v2/list_movies.json?sort_by=rating'

In other words 'https://yts.ag/api/v2/list_movies.json?sort_by=rating' is not supported any more. please use 'https://yts.am/api/v2/list_movies.json?sort_by=rating'

0

노마드코더님의 프로필 이미지
노마드코더
지식공유자

2018. 10. 13. 15:03

안녕하세요. 노마드코더입니다. 저희가 인프런에서 질문/답변은 지원을 하지 않고 있습니다. youtube 링크에 직접 댓글로 달아주시거나. 저희 노마드아카데미 (https://academy.nomadcoders.co) 에서 질문해주시기 바랍니다. 고맙습니다.