AR_Engine_SDK
载入中...
搜索中...
未找到
函数 | 变量
xhttp.lua 文件参考

函数

function xhttp request (url, method, headers, body, callback)
 
function xhttp cancel (task)
 

变量

 xhttp = {}
 

函数说明

◆ cancel()

function xhttp cancel ( task  )

取消请求

参数
task请求任务

◆ request()

function xhttp request ( url  ,
method  ,
headers  ,
body  ,
callback   
)

反序列化

参数
urlstring 请求URL地址(不可为空)
methodstring 请求方式(不可为空)
headerstable 请求头列表(可为空)
bodystring 请求体(可为空)
callbackfun(code:userdata,content:any):void 回调函数
返回
number 请求任务

变量说明

◆ xhttp

xhttp = {}