TTP|POST提交数据:ContentType=application/x|www|form|urlencoded 内容格式|C#源码
content-type
application/x-www-form-urlencoded;charset=UTF-8
C#代码示例:
//组合x-www-form-urlencoded格式的字符串
var pdata = $"appid={appid}&nonce={nonce}×tamp={timestamp}&sign={signStr}&operation=add&data={json}";
//提交数据
var result = WebApiTools.Post(url, pdata, "application/x-www-form-urlencoded;charset=UTF-8");
return Newtonsoft.Json.JsonConvert.DeserializeObject<PostResult>(result);
WebApiTools.cs源码下载:
https://www.csframework.com/archive/newdoc/1641395322.html
扫一扫加作者微信