| RequestUtilityHttpPost 方法 (IServiceProvider, String, CookieContainer, DictionaryString, String, Encoding, X509Certificate2, Boolean, DictionaryString, String, Int32, Boolean) |
Senparc.Weixin SDK 官方教程《微信开发深度解析》已出版,支持中国开源事业,请【购买正版】!
《微信公众号+小程序》视频课程已经上线,【点击这里】学习!
NeuChar(纽插)已经上线,为开发者提供一站式跨平台管理枢纽,并可将应用入驻到 NeuChar 应用商店!新功能正在不断增加中,快来使用吧! https://www.neuchar.com
在线动态微信接口 Swagger WebApi 文档: https://weixin.senparc.com:8039
使用Post方法获取字符串结果,常规提交
命名空间:
Senparc.CO2NET.HttpUtility
程序集:
Senparc.CO2NET (在 Senparc.CO2NET.dll 中) 版本:1.4.300-preview.3.21201.4.100+9de96adf02982fcbddc436d3680e19a719e9d8b2
语法 public static string HttpPost(
IServiceProvider serviceProvider,
string url,
CookieContainer cookieContainer = null,
Dictionary<string, string> formData = null,
Encoding encoding = null,
X509Certificate2 cer = null,
bool useAjax = false,
Dictionary<string, string> headerAddition = null,
int timeOut = 10000,
bool checkValidationResult = false
)
Public Shared Function HttpPost (
serviceProvider As IServiceProvider,
url As String,
Optional cookieContainer As CookieContainer = Nothing,
Optional formData As Dictionary(Of String, String) = Nothing,
Optional encoding As Encoding = Nothing,
Optional cer As X509Certificate2 = Nothing,
Optional useAjax As Boolean = false,
Optional headerAddition As Dictionary(Of String, String) = Nothing,
Optional timeOut As Integer = 10000,
Optional checkValidationResult As Boolean = false
) As String
参数
- serviceProvider
- 类型:SystemIServiceProvider
.NetCore 下的服务器提供程序,如果 .NET Framework 则保留 null - url
- 类型:SystemString
- cookieContainer (Optional)
- 类型:System.NetCookieContainer
- formData (Optional)
- 类型:System.Collections.GenericDictionaryString, String
- encoding (Optional)
- 类型:System.TextEncoding
- cer (Optional)
- 类型:System.Security.Cryptography.X509CertificatesX509Certificate2
证书,如果不需要则保留null - useAjax (Optional)
- 类型:SystemBoolean
- headerAddition (Optional)
- 类型:System.Collections.GenericDictionaryString, String
header 附加信息 - timeOut (Optional)
- 类型:SystemInt32
- checkValidationResult (Optional)
- 类型:SystemBoolean
验证服务器证书回调自动验证
返回值
类型:
String参见