增加HTTP post请求
parent
62a0903bc1
commit
2d5ae6b8b2
|
@ -30,4 +30,24 @@ function HttpManager:SendGetHttp(url, callback, _, _, failCB)
|
|||
end, nil, nil, failCB)
|
||||
end
|
||||
|
||||
|
||||
|
||||
-- post 请求
|
||||
function HttpManager:SendPostHttp(url, data,callback, _, _, failCB)
|
||||
local request = url
|
||||
_Counter = _Counter + 1
|
||||
local count = _Counter
|
||||
LogWarn("Http请求" .. count.. ":"..request)
|
||||
LogError("chanel=="..ServerConfigManager.GetVersionInfo("channel"))
|
||||
LogError("request=="..request)
|
||||
networkMgr:SendHttpPost_Json_Lua(request,data,function(msg)
|
||||
LogError("Http请求" .. count.. "结果:"..msg)
|
||||
if callback then
|
||||
callback(msg)
|
||||
end
|
||||
end,failCB)
|
||||
end
|
||||
|
||||
|
||||
|
||||
return HttpManager
|
Loading…
Reference in New Issue