NetBlog主题

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

C# Get和Post请求与响应

4385

2023-10-20 更新方法一(推荐使用)public string HttpGet(string url){ using (HttpClient client = new HttpClient()) { var response = client.GetAsync(url).Result; if (response.IsSuccessStatusCode) { var content = resp…