[英]Is it possible to remove quotations from AddParameter method RestSharp?
[英]RestSharp AddParameter
我想发出一个RestSharp请求,并且以下期望结果是:
tes = {
"paye": "0",
"type": "0",
"lines": [
{
"desc": "1",
"note": "10",
},
{
"desc": "2",
"note": "20",
},
{
"desc": "3",
"note": "30",
}
]
}
所以我发出这样的请求:
var client = new RestClient(url);
var request = new RestRequest("tes", Method.POST);
request.AddParameter("paye", 0);
request.AddParameter("type", 0);
问题是如何完成lines []部分?
谢谢
创建类,如:
class tes {
//include all the properties here
}
序列化对象,并将其传递给带有RestSharp请求的参数。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.