HTTP|POST提交数据:ContentType=application/json 内容格式|C#源码
HTTP|POST提交数据:ContentType=application/json 内容格式|C#源码
content-type
application/json;charset=UTF-8
C#代码示例:
ApiModel api = new ApiModel
{
appid = "qifan",
nonce = new Random().Next(1000, 9999).ToString(),
timestamp = GetTimeStamp(),
data = json,
sign = signStr,
operation = "add",
};
var postData = Newtonsoft.Json.JsonConvert.SerializeObject(api);
var result = WebApiTools.Post(url, postData, "application/json;charset=UTF-8;");
return Newtonsoft.Json.JsonConvert.DeserializeObject<PostResult>(result);
WebApiTools.cs源码下载:
https://www.cscode.net/archive/newdoc/1641395322.html
扫一扫加作者微信