void OnHttpError(HttpWebRequestInfo reqInfo, BestHTTP.HTTPResponse res) { if (res.StatusCode == 404) { reqInfo.OnHttp404Error(reqInfo); } else if (res.StatusCode == 401) { var customCode = res.GetFirstHeaderValue(StatusCode.KEY_STS); if (customCode == ErrCode.D0000S.Code) { Debug.LogFormat("{0} 401, Need update. {1} . ", reqInfo.Host, customCode); reqInfo.OnClientVersionError(reqInfo); } else if (customCode == ErrCode.G0001S.Code) { Debug.LogFormat("{0} 401 Server not started {1} . ", reqInfo.Host, customCode); reqInfo.OnHttp404Error(reqInfo); } else { Debug.LogFormat("{0} 401 {1} . ", reqInfo.Host, customCode); reqInfo.OnHttp401Error(reqInfo); } } else { reqInfo.OnCommonHttpError(reqInfo, res.StatusCode); Debug.LogError(res.DataAsText, reqInfo.Caller); } }
static StackObject *get_Data_1(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *ptr_of_this_method; StackObject *__ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); BestHTTP.HTTPResponse instance_of_this_method = (BestHTTP.HTTPResponse) typeof(BestHTTP.HTTPResponse).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.Data; return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method)); }