验证中...
7.21 杭州源创会火热报名中,一起来看看移动开发如何紧跟浪潮?
语言: C#
分类: 网络技术
最后更新于 2018-03-17 18:22
Request Code
原始数据 复制代码
HttpClient httpClient = new HttpClient();
httpClient.Timeout = TimeSpan.FromSeconds(60);
httpClient.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"));
//Get Request
var res1 = httpClient.GetStringAsync(url).Result.ToString();
//Post Request
var json = JsonConvert.SerializeObject(model);
var response = httpClient.PostAsync(url,new StringContent(json)).Result;
var res2 = response.Content.ReadAsStringAsync().Result;

评论列表( 0 )

你可以在登录后,发表评论

11_float_left_people 11_float_left_close