var Client = new HttpClient();
Client.DefaultRequestHeaders.Clear();
Client.DefaultRequestHeaders.Add("Header1", "Value1");
Client.DefaultRequestHeaders.Add("Header2", "Value2");
Client.DefaultRequestHeaders.Add("Header3", "Value for exact this request");
var response = Client.PutAsync(new Uri($"http://example.com/books/1234/readers/837"), null); //.Result (?)
Client.Dispose();
标签:请求,Add,Client,DefaultRequestHeaders,var,new,httpclient From: https://www.cnblogs.com/Net191111/p/17356896.html