Reactjs 文件生成器APi和react js之间的授权
异步组件didmount(){ 如何获得json响应Reactjs 文件生成器APi和react js之间的授权,reactjs,Reactjs,异步组件didmount(){ 如何获得json响应 // console.log(JSON.stringify(client)+"checking") //const proxyurl = "https://cors-anywhere.herokuapp.com/"; const url ="fmi/data/v1/database....."; await fetch( url,{
// console.log(JSON.stringify(client)+"checking")
//const proxyurl = "https://cors-anywhere.herokuapp.com/";
const url ="fmi/data/v1/database.....";
await fetch( url,{
method: 'GET',
headers:{
Accept: 'application/json',
'Content-Type': 'application/json',
Authorization: "Bearer 01e846d73c2acbe5054f0aac648528069feb003e66309b89ca05" }
}).then(response =>console.log(response))
response is Response {type: "basic", url: "htt", redirected: false, status: 200, ok: true, …}
body: ReadableStream
locked: false
__proto__: ReadableStream
cancel: ƒ cancel()
constructor: ƒ ReadableStr