查看: 827|回复: 1

o2oa请求外部接口跨域如何解决

升级   0.02%

4

主题

1

回帖

2

积分

注册会员

Rank: 2

积分
2
发表于 2024-9-10 12:02:38 | 显示全部楼层 |阅读模式

如下,请求接口提示跨域


fetch("https://外部//send?key=xxx", requestOptions)
   .then(response => response.text())
   .then(result => console.log(result))
   .catch(error => console.log('error', error));


回复

使用道具 举报

cxy

升级   4.92%

0

主题

83

回帖

492

积分

注册会员

Rank: 2

积分
492
发表于 2024-9-11 11:25:24 | 显示全部楼层
需要外部接口的支持,具体看这篇文章
https://developer.mozilla.org/zh ... 4%E5%AD%97%E6%AE%B5
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

联系客服 关注微信 下载APP 返回顶部 返回列表
viewthread