我正在使用fetch从这样的API中获取一些东西:
fetch('http://facebook.github.io/react-native/movies.json')
.then(
data => console.log(data),
error => console.log(error)
)
Run Code Online (Sandbox Code Playgroud)
但我得到的是以下对象,而不是实际数据
_bodyBlob: Blob
_bodyInit: Blob
headers: Headers
ok: true
status: 200
statusText: undefined
type: "default"
url: "http://facebook.github.io/react-native/movies.json"
Run Code Online (Sandbox Code Playgroud)
有人可以解释我哪里错了?我做错了什么?