NetBlog主题

C# Get和Post请求与响应
C#基础

C# Get和Post请求与响应

5214

方法一(推荐使用)public string HttpGet(string url){ using (HttpClient client = new HttpClient()) { var response = client.GetAsync(url).Result; if (response.IsSuccessStatusCode) { var content = response.Content.Re…