具体实现代码 HttpClient httpClient = new HttpClient(); //如果请求第三方接口时需要在头部添加信息时 这样用 httpClient.DefaultRequestHeaders.Add("Ip", "111111"); //发送请求