使用XMLHttoRequest连接一个post服务器,使用send方法时,浏览器没问题,但手机上直接闪退,报错内容如下
使用get方法则没有这个问题,请大大们解决一下
const httpReq = cc.loader.getXMLHttpRequest();
httpReq.onreadystatechange = function () {
cc.log(`状态:${httpReq.readyState}`);
};
httpReq.open("POST", url, true);
httpReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
const data = sendData ? sendData : null;
httpReq.send(data);
以上是前端代码
来人,求解决啊,大大们
是不是需要 retain 或者 release 完全猜测
为什么需要retain和release
论坛里的大大都去哪里了
去看一下麒麟子的棋牌项目中的http请求
换了个手机,这个问题就没出现了