logServer 日志

是否需要验证:是

控制客户端发送

GET /logServer HTTP/1.1    
Server: LOG 服务 IP    
auth: 验证串--触动专业版 iOS 无需写入验证串
Port: 端口号
属性 说明
HTTP 方法 GET /logServer HTTP/1.1
Server LOG 服务的 IP
Port 端口号,触动精灵 50005,小精灵 50015(安卓 10 及以上系统端口号为 50055)
auth 验证串(触动专业版 iOS 无需写入验证串)

服务返回

HTTP/1.0 200 OK
Content-Length: 2
Content-Type: text/html; charset=utf-8
[ok|fail]
属性 说明
HTTP 返回代码 HTTP/1.0 200 OK
Content-Length HTTP 消息长度
Content-Type text/html; charset=utf-8 HTTP 消息类型:格式和编码
ok、fail

HTTP 返回代码含义

返回代码 代码含义
200 成功

Lua 示例代码

local ts = require("ts")
header_send = {["Server"]="10.0.0.63",["Port"]=50005}
body_send = {}
ts.setHttpsTimeOut(60)
--10.0.0.63 为设备 IP 并且需要是局域网,触动精灵端口为 50005,小精灵端口号 50015,安卓 10 及以上系统小精灵端口号为 50055
status_resp, header_resp,body_resp = ts.httpGet("http://10.0.0.63:50005/logServer", header_send, body_send)
if status_resp == 200 then
    dialog("发送日志成功",3)
    dialog(header_resp)
    dialog(body_resp)
else
    dialog("发送日志失败")
end

注意事项

  • 安卓标准版、iOS 标准版及 iOS 专业版必须有授权,授权为试用状态无法调用。

  • 安卓 10 及其以上系统小精灵需要修改端口号为 50055。

Copyright 北京帮你玩科技有限公司 2023 all right reserved,powered by Gitbook该文章修订时间: 2024-03-06 17:50:18

results matching ""

    No results matching ""