o2oa请求外部接口跨域如何解决
如下,请求接口提示跨域
fetch("https://外部//send?key=xxx", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
需要外部接口的支持,具体看这篇文章
https://developer.mozilla.org/zh-CN/docs/Web/HTTP/CORS#http_%E5%93%8D%E5%BA%94%E6%A0%87%E5%A4%B4%E5%AD%97%E6%AE%B5
页:
[1]