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

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

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

...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

2. HTTPPOST发送Byte字节流,服务器无法解析 [ 95%]

HTTPPOST发送Byte字节流,服务器无法解析 JS代码: function starConnection() { console.log("starConnection"); conn=new HttpRequest(); conn.once(Event.PROGRESS, this, onHttpRequestProgress); conn.once(Event.COMPLETE, this, onHttpRequestComplete); conn.once(Event.ERROR, this, onHttpRequ...

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

3. LayaNative中偶尔会出现所有HTTP POST方式交互均无回应的问题 [ 95%]

LayaNative中偶尔会出现所有HTTP POST方式交互均无回应的问题 使用的LayaNative版本为2.7。偶尔会出现所有使用了POST方式的Ajax请求发送后无法执行成功或失败回调的情况。不知是否有人和我遇到过一样的问题。 我的POST请求全部设置...

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

4. 如何post发送json数据中包含&&特殊字符,怎么办? [ 94%]

...3&&456", "b":"ccc"}; str="paramA="+JSON.stringify(tj); //xhr.send("http:xxx.xxx.com","a=xxxx&b=xxx","post","text"); xhr.send("http:xxx.xxx.com",str,"post","text"); 服务端解析的时候,paramA参数的值为:{"a":"123 剩下的被解析为另一个post变量了。 试了字符转...

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

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

最新版本IDE,如何获取http返回的json数据 参照官网例子写的http post请求,需要获取返回的json数据,但是一直获取不到,请教一下什么问题 //注册按钮响应函数 Login.prototype.onButtonLogin = function (){ console.log ('按了登录按钮')  var xhr = ...

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

6. post提交问题 [ 90%]

post提交问题 XMLHttpRequest cannot load http://xxx.xxx.xxx/subData. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'file://' is therefore not allowed access. The response had HTTP status code 500. 后台是用c#写的,请问出现这问题怎么解决,...

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

7. http 请求 once 的 回调参数,如何传递和接收? [ 89%]

http 请求 once 的 回调参数,如何传递和接收? once () method  public function once(type:String, caller:*, listener:Function, args:Array = null):EventDispatcher使用 EventDispatcher 对象注册指定类型的事件侦听器对象,以使侦听器能够接收事件通知,此侦...

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

8. HttpRequest 回调方法都没执行 LayaAir 1.7.17 beta JS版本 [ 88%]

HttpRequest 回调方法都没执行 LayaAir 1.7.17 beta JS版本 function postData(url,request) { this.http = new Laya.HttpRequest(); //new一个HttpRequest类 this.http.once(Laya.Event.PROGRESS,this,this.onProgress); //数据传输中 this.http.once(Laya.Event.COMPLETE,this,this.onComplete); //...

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

9. XMLRequest在layaNative下请求崩溃,请求官方协助! [ 86%]

...(this: void, data: JSON) => void): void {         let hr = new Laya.HttpRequest();         hr.once(Laya.Event.COMPLETE, this, (e: any): void => {             callback(JSON.parse(hr.data));         });       hr.send(url, JSON.stringify(data), 'post', 'text', ['content-type'...

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

10. HttpRequest如何发送JSON数据 [ 86%]

HttpRequest如何发送JSON数据 发送JSON数据         var logReq = new laya.net.HttpRequest();         logReq.once(Laya.Event.COMPLETE,this,this.onComplete);         logReq.send("http://127.0.0.1:3001/login", "username: 'lxd', password: 'lxd'",         'post', "json...

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