飞行前的Power BI React响应无效(重定向)

时间:2018-08-13 15:03:56

标签: reactjs powerbi-embedded

当我获取功率Bi报告网址时,经常会收到此错误

无法加载https://app.powerbi.com/sharedwithme/dashboards/d2b58434-67be-4ce3-9f9a-881dd870d19a:飞行前响应无效(重定向)

未捕获(承诺)TypeError:无法获取

fetch(`https://app.powerbi.com/sharedwithme/dashboards/d2b58434-67be-4ce3-9f9a-881dd870d19a`,{
  method: 'OPTIONS',
  mode: 'cors',
   headers:{
     'Content-Type':'application/x-www-form-urlencoded',
     'Access-Control-Allow-Origin':'*',
     'Access-Control-Allow-Methods': 'DELETE, HEAD, GET, OPTIONS, POST, PUT',
     'Access-Control-Allow-Headers': 'Content-Type, Content-Range, Content-Disposition, Content-Description',
   },
   withCredentials: true,
   credentials: 'include',
   params: {'name':  'abc@gmail.com'},
 })
  .then(embedConfig => {
    embedConfig.settings = {
      filterPaneEnabled: this.filterPaneEnabled,
      navContentPaneEnabled: this.navContentPaneEnabled
    };
    this.setState({
      embedConfig
    });
    return embedConfig;
  });
    return embedConfig;
  });

}

0 个答案:

没有答案