Closed javaLuo closed 6 years ago
在普通的web、weixin中,ajax开了CORS, 是ok的. 但在IOS App、Android App的webview中,ajax会error, 用try...catch捕获,会触发catch方法,返回err = {}
in browser,reqwest post is ok。 in IOS App, Android App webview, reqwest post is error.
but jquery.ajax is ok.
the reqwest version is 2.0.5
this is my code:
return reqwest({ url:my URL, method: 'post', contentType: 'application/json;charset=UTF-8', crossOrigin: true, withCredentials: true, data: JSON.stringify({a: 123, b: 123}), type: 'json', })
my URL
I need help
在普通的web、weixin中,ajax开了CORS, 是ok的. 但在IOS App、Android App的webview中,ajax会error, 用try...catch捕获,会触发catch方法,返回err = {}
in browser,reqwest post is ok。 in IOS App, Android App webview, reqwest post is error.
but jquery.ajax is ok.
the reqwest version is 2.0.5
this is my code:
return reqwest({ url:
my URL
, method: 'post', contentType: 'application/json;charset=UTF-8', crossOrigin: true, withCredentials: true, data: JSON.stringify({a: 123, b: 123}), type: 'json', })I need help