大约有 7 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0034 秒)
...this.callbackHandler = callback; // this.errcallback = errcallback; //this.http.once(Laya.Event.PROGRESS, this, this.onHttpRequestProgress); this.http.once(Laya.Event.COMPLETE, this, this.onHttpRequestComplete); this.http.once(Laya.Event.ERROR, this, this.onHttpRequestError); this.http.send(url, 'ch...
来源: Laya_社区 发布时间: 20180916
怎么使用http请求 httpRequest: function (url, data) { var xhr = cc.loader.getXMLHttpRequest(); if (!xhr.onreadystatechange) { xhr.onreadystatechange = function () { if (xhr.readyState == 4 && (xhr.status >= 200 && xhr.status <= 207)) { //cc.log("response:\n" + xhr.respons...
来源: Laya_社区 发布时间: 20180807
LayaNative中偶尔会出现所有HTTP POST方式交互均无回应的问题 使用的LayaNative版本为2.7。偶尔会出现所有使用了POST方式的Ajax请求发送后无法执行成功或失败回调的情况。不知是否有人和我遇到过一样的问题。 我的POST请求全部设置...
来源: Laya_社区 发布时间: 20200810
打包app,http无法设置content-type 我明明设置了content-type为json,在浏览器里都正常,但是在手机运行器里就无法使用,我发的数据为"{"a":1}",到服务器上变成了 "{"a":1}"="",content-type也变成了application/x-www-form-urlencoded 代码如下: static...
来源: Laya_社区 发布时间: 20170123
... 之前我个人写的 不知道是不是在这个里面 var xhr = new XMLHttpRequest(); xhr.open("GET",url, true) xhr.setRequestHeader("Accept", "*/*"); xhr.setRequestHeader("Content-Type", "application/json"); 还是说用参考代码里的HttpRequest() var xhr = new Laya.HttpRequest(); xhr.http.s...
来源: Laya_社区 发布时间: 20180704
关于HttpRequest报错问题 var xmlHttp = new Laya.HttpRequest(); xmlHttp.open("POST", url, true); xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=utf-8"); xmlHttp.once(Event.COMPLETE,this,onHttpRequestComplete); xmlHttp.once(Event.ERROR,this,errorHandler); xml...
来源: Laya_社区 发布时间: 20180202
...发手册,微信的舞台大小 不是 laya的框架舞台大小) https://layaair2.ldc2.layabox.com/demo2/?language=zh&category=2d&group=SmartScale&name=T 适配官方有教程,建议先去看下开发手册。 full模式 exactfit模式 目前如果做2d,微...
来源: Laya_社区 发布时间: 20210924