lua XMLHttpRequest下载
来源:互联网 发布:大纲软件 编辑:程序博客网 时间:2024/05/22 14:35
local function onNodeEvent(event) if "exit" == event then cc.Director:getInstance():getScheduler():unscheduleScriptEntry(self.schedulerID) elseif "enter" == event then print("-->test began") local xhr = cc.XMLHttpRequest:new() xhr.responseType = cc.XMLHTTPREQUEST_RESPONSE_STRING xhr:open("POST","http://httpbin.org/post") local function onReadyStateChange() print("status:"..xhr.statusText.."response:"..xhr.response) end xhr:registerScriptHandler(onReadyStateChange) xhr:send() print("-->test end") end end
输出如下:
[LUA-print] -->test began[LUA-print] -->test end[LUA-print] status:200 OKresponse:{ "args": {}, "data": "", "files": {}, "form": {}, "headers": { "Accept": "*/*", "Content-Length": "0", "Content-Type": "application/x-www-form-urlencoded", "Host": "httpbin.org" }, "json": null, "origin": "222.128.185.92", "url": "http://httpbin.org/post"}
0 0
- lua XMLHttpRequest下载
- LUA XMLHttpRequest 中有个bug
- XMLHttpRequest下载并生成文件
- 利用XMLHttpRequest技术实现断点续传下载文件
- Lua下载与使用
- lua程序设计下载
- Lua source code 下载
- Lua下载安装
- cocos-Lua请求服务端数据(XMLHttpRequest小积累)
- XMLHttpRequest
- XMLHttpRequest
- XMLHTTPRequest
- XMLHTTPRequest
- XMLHttpRequest
- XMLHttpRequest
- XMLHttpRequest
- XMLHttpRequest
- xmlhttprequest
- web前端小白入门教程
- 各种排序算法的复杂度
- LeetCode 152. Maximum Product Subarray
- Java开源Web开发框架
- MapReduce实战【单表关联】
- lua XMLHttpRequest下载
- PHP看看我一周的心情变化吧,挺有意思的!
- 魏则西反思
- rabbitmq rpc java
- 仅三行代码的按键扫描程序,绝对够经典(秒杀郭天祥讲解的按键扫描)
- duilib 颜色 是 ARGB ,不是RGB,前两位是透明度
- Java常用类库
- kafka+zookeeper环境配置(Mac 或者 linux环境)
- 如何保护数字证书和私钥