protected async Task <string> GetHtmlAsync(string url) { try { string html = await HttpBaseService.SendGetRequest(url); //byte[] bytes = Encoding.UTF8.GetBytes(html); //html = Encoding.GetEncoding("GBK").GetString(bytes); return(html); } catch { return(null); } }
protected async Task <T> GetResponseAsync <T>(string url) where T : class { try { string json = await HttpBaseService.SendGetRequest(url); if (json != null) { return(JsonHelper.Deserlialize <T>(json)); } else { return(null); } } catch { return(null); } }