标签:
public async Task<string> Get() { return await GetArticleContentAsync(); } private async Task<string> GetArticleContentAsync() { using (var httpClient = new HttpClient()) { var response = await httpClient.GetAsync("http://www.asp.net"); var buffer = await response.Content.ReadAsByteArrayAsync(); return Encoding.UTF8.GetString(buffer); } }
标签:
原文地址:http://www.cnblogs.com/voyage-li/p/5457194.html