问题描述
我正在从我的应用程序中向开发商店调用 Shopify REST API,但 fetch
在 Chrome 上使用 net::ERR_TOO_MANY_REDIRECTS
失败。
我的应用在本地机器上运行,我使用 ngrok
进行隧道传输。
const orders_url = 'https://{store-name}.myshopify.com/admin/api/2020-10/orders.json?status=any';
async function getorders() {
try {
const resp = await fetch(orders_url,{
credentials: 'include',mode: 'no-cors'
});
console.log(resp);
} catch (error) {
console.log(error);
}
}
另一方面,使用 GraphQL 有效,关于为什么上述 fetch
调用失败的任何想法?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)