• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 68 项符合查询结果, 库内数据总量为 30,903 项。 (搜索耗时: 0.0041 秒)

1. HttpRequest详解(TypeScript-LayaAir基础篇(TS)-数据与通信) [ 100%]

...http.timeout = 10000;//设置超时时间; xhr.once(Laya.Event.COMPLETE, this, this.completeHandler); xhr.once(Laya.Event.ERROR, this, this.errorHandler); xhr.on(Laya.Event.PROGRESS, this, this.processHandler); xhr.send("res/data.data", "", "get", "text"); console.log("aaaa"); } private processHan...

来源: Laya2.0_文档 发布时间: 20210715

2. HttpRequest详解(JavaScript-LayaAir基础篇(JS)-数据与通信) [ 99%]

...; xhr.http.timeout = 10000;//设置超时时间; xhr.once(Event.COMPLETE,this,completeHandler); xhr.once(Event.ERROR,this,errorHandler); xhr.on(Event.PROGRESS,this,processHandler); xhr.send("res/data.data","","get","text"); function processHandler(data){ console.log(data); } function errorHandler(...

来源: Laya2.0_文档 发布时间: 20210714

3. HttpRequest详解(ActionScript-LayaAir基础篇(AS3)-数据与通信) [ 98%]

...; xhr.http.timeout = 10000;//设置超时时间; xhr.once(Event.COMPLETE,this,completeHandler); xhr.once(Event.ERROR,this,errorHandler); xhr.on(Event.PROGRESS,this,processHandler); xhr.send("res/data.data","","get","text"); } private function processHandler(data:Object):void { trace(data); } priva...

来源: Laya2.0_文档 发布时间: 20210715

4. HTTP通信 · LayaAir3.3 · 引擎文档 · LAYABOX [ 95%]

...a.TextArea; private text: Laya.Label = new Laya.Label(); onAwake(): void { this.initUI(); this.connect(); } /** * 初始化UI */ private initUI(): void { this.showLogger(); this.text.text = "请查看源码和调试信息,了解如何使用"; this.text.color = "#FFFFFF"; this.text.font = "Impact";...

来源: Laya3.0_文档 发布时间: 20250214

5. 网络通信 · LayaAir3文档 · LAYABOX [ 94%]

...象所封装的原生 XMLHttpRequest 引用。 */ get http(): any { return this._http; } 通过 ._http 属性可以获得XMLHttpRequest。XMLHttpRequest 中文可以解释为可扩展超文本传输请求。它为客户端提供了在客户端和服务器之间传输数据的功能。它提供了一...

来源: Laya3.0_文档 发布时间: 20250104

6. 手机调试时http请求错误,返回Request failed Status:0 [ 92%]

...new Laya.HttpRequest(); hr.http.timeout = 5000; hr.on(Laya.Event.PROGRESS, this, this.onHttpRequestProgress); hr.once(Laya.Event.COMPLETE, this, (response)=>{ UIFactory.closeWaitBar(); this.onHttpRequestComplete(response); if(handleOk){ handleOk(response); } }); hr.once(Laya.Event.ERROR, this, (e...

来源: Laya_社区 发布时间: 20190308

7. 网络请求添加headers后 post数据错误 [ 90%]

...加headers则正常  示例代码  var headers = [ 'C-Sign', sign ]; // this.caller = caller; this.callbackHandler = callback; // this.errcallback = errcallback; //this.http.once(Laya.Event.PROGRESS, this, this.onHttpRequestProgress); this.http.once(Laya.Event.COMPLETE, this, this.onHttpRequestCom...

来源: Laya_社区 发布时间: 20180916

8. httpRequest send返回Request failed Status:0 [ 89%]

... = "http://thirdqq.qlogo.cn/g%3Fb% ... 3B%3B xhr.once(Laya.Event.COMPLETE, this, this.completeHandler, [url, 1]); xhr.once(Laya.Event.ERROR, this, this.errorHandler); xhr.send(url, "", "get", "arraybuffer"); } } GameMain.prototype.completeHandler = function (URL, id, data) { // private completeHandl...

来源: Laya_社区 发布时间: 20180629

9. 最新版本IDE,如何获取http返回的json数据 [ 86%]

...; xhr.http.timeout = 10000;//设置超时时间; xhr.once(Event.COMPLETE,this,completeHandler); xhr.once(Event.ERROR,this,errorHandler); xhr.once(Event.PROGRESS,this,processHandler);  var sendData = {account:"aaa",password:"bbb"} xhr.send("http://xxx/login", JSON.stringify(sendData), "post", "jso...

来源: Laya_社区 发布时间: 20180824

10. 网络和格式-POST [ 84%]

...})(); function connect() { hr = new HttpRequest(); hr.once(Event.PROGRESS, this, onHttpRequestProgress); hr.once(Event.COMPLETE, this, onHttpRequestComplete); hr.once(Event.ERROR, this, onHttpRequestError); hr.send('http://xkxz.zhonghao.huo.inner.layabox.com/api/getData', 'name=myname&psword=xxx', '...

来源: Laya_示例 发布时间: 20250223