private void OpenPost()//同步 { using (HttpClient client = new HttpClient()) { client.DefaultRequestHeaders.Add("name","zhuzili"); var response = client.PostAsync("http://www.baidu.com",null).Result; var str = response.Content.ReadAsStringAsync().Result; MessageBox.Show(str); } }