.Net HTTP 请求封装代码

有了这些方法请求第三api接口就不用慌了,拷贝就可以用了

定义了一个请求的接口IHttpClientMananger:

1)POST请求泛型数据

/// 
/// POST请求泛型数据
/// 
/// 请求的对象
/// 地址
/// 参数
/// 头部数据
/// 
Task PostEntityAsync(string url, HttpContent httpContent, Dictionary heads = null);


2)Form表单POST请求泛型接口

/// 
/// Form表单POST请求泛型接口
/// 
/// 

你可能感兴趣的:(C#&.Net开发,http,网络协议,.net)