如何从OMDb API请求数据?

时间:2019-08-25 11:43:43

标签: javascript api fetch

尝试从OMDb API获取数据,但始终出现相同的错误:

fetch('http://www.omdbapi.com/?i=tt3896198&apikey=[mykey]').then(response => console.log(response))*

错误:

[Error] Not allowed to request resource
    Console Evaluation (Console Evaluation 24:3)
    evaluateWithScopeExtension
    _evaluateOn
    _evaluateAndWrap
[Error] Fetch API cannot load http://www.omdbapi.com/?i=tt3896198&apikey=3c2dd656 due to access control checks.
    Console Evaluation (Console Evaluation 24:3)
    evaluateWithScopeExtension
    _evaluateOn
    _evaluateAndWrap

0 个答案:

没有答案