可以将CORS或JSONP与marketo rest api一起使用吗
我试图绕过sop,从marketo api获取线索详细信息。 是否可以使用CORS或JSONP。 看起来不是,但我担心我的代码中可能有bug 我正在使用《第三方Javascript》一书中的CORS方法大纲可以将CORS或JSONP与marketo rest api一起使用吗,cors,jsonp,marketo,Cors,Jsonp,Marketo,我试图绕过sop,从marketo api获取线索详细信息。 是否可以使用CORS或JSONP。 看起来不是,但我担心我的代码中可能有bug 我正在使用《第三方Javascript》一书中的CORS方法大纲 function createCORSRequest(method, url){ var xhr = new XMLHttpRequest(); if ("withCredentials" in xhr){ console.log('We have credentials
function createCORSRequest(method, url){
var xhr = new XMLHttpRequest();
if ("withCredentials" in xhr){
console.log('We have credentials');
xhr.open(method, url, false);
} else if (typeof XDomainRequest != "undefined"){
xhr = new XDomainRequest();
xhr.open(method, url, false);
console.log('Domain request is undefined');
} else {
xhr = null;
console.log('null null null');
}
return xhr;
};
xhr = new createCORSRequest();
xhr.open("GET", {url}, false);
xhr.send();
目前我得到了标准的soap错误
我只需要在接收文档的域上创建一个新的api。实际上是Marketo rest api的包装器
我只需要在接收文档的域上创建一个新的api。实际上是Marketo rest api的包装器
这确实是最好的方法。可能有一些方法可以绕过它,但从安全角度来看,公开访问令牌确实是个坏消息