Ale*_*kha 11 c# asp.net generics serialization restsharp
我正在尝试使用RestSharp向我的实体发布请求.
但是我收到一个错误:
"System.Xml.XmlException : The '`' character, hexadecimal value 0x60,
cannot be included in a name."
Run Code Online (Sandbox Code Playgroud)
我将列表放在查询的正文中.
var strList = new List<string>();
strList.Add("one");
strList.Add("two");
restRequest.AddBody(strList);
Run Code Online (Sandbox Code Playgroud)
它似乎不喜欢通用序列化的方式.有没有建议如何将列表传递给请求?
小智 7
add:restRequest.RequestFormat = DataFormat.Json before:restRequest.AddBody(strList);
| 归档时间: |
|
| 查看次数: |
2008 次 |
| 最近记录: |