c# 泛型demo
标签:pos app head post private base async cli pcl
private void Fn_Post(T dto, string api)
{
HttpClient client = new HttpClient();
client.BaseAddress = new Uri("http://localhost:51529/");
string json = DefaultJsonSerializer.Serialize(dto);
HttpContent httpcontent = new StringContent(json);
httpcontent.Headers.ContentType = new MediaTypeHeaderValue("application/json");
var result = client.PostAsync(api, httpcontent).Result;
client.Dispose();
}
c# 泛型demo
标签:pos app head post private base async cli pcl
原文地址:https://www.cnblogs.com/jasonlai2016/p/11372900.html
文章来自:
搜素材网的
编程语言模块,转载请注明文章出处。
文章标题:
c# 泛型demo
文章链接:http://soscw.com/index.php/essay/52385.html
评论