public void HttpDownLoadXml(string url, string downloadEnd, string downloadError) { httRequest = null; httRequest = new LKHttpRequest2String((str) => { //CallLuafunction(downloadEnd, str); LuaInstance.instance.Get().LuaStaticFuncCall(mupdateBehaviour.Luaclass_ref, downloadEnd, str); }, (error) => { LuaInstance.instance.Get().LuaStaticFuncCall(mupdateBehaviour.Luaclass_ref, downloadError, error); }); httRequest.Download(url, "", ""); }
public void HttpDownLoadFile(string url, string path, string writeSizeFilePath, string downloadbegin, string downloading, string downloadEnd, string downloadError) { httRequest = null; httRequest = new LKHttpRequest2File((offset, downloadLength) => { LuaInstance.instance.Get().LuaStaticFuncCall(mupdateBehaviour.Luaclass_ref, downloadbegin, offset, downloadLength); }, (progress) => { LuaInstance.instance.Get().LuaStaticFuncCall(mupdateBehaviour.Luaclass_ref, downloading, progress); }, (endStr) => { LuaInstance.instance.Get().LuaStaticFuncCall(mupdateBehaviour.Luaclass_ref, downloadEnd, endStr); }, (error) => { Debug.Log(error); LuaInstance.instance.Get().LuaStaticFuncCall(mupdateBehaviour.Luaclass_ref, downloadError, error); }); httRequest.Download(url, path, writeSizeFilePath); }