【发布时间】:2013-08-22 08:26:50
【问题描述】:
我正在尝试使用 RestSharp 向我的实体发布请求。
但我收到一个错误:
"System.Xml.XmlException : The '`' character, hexadecimal value 0x60,
cannot be included in a name."
我将列表放在查询正文中。
var strList = new List<string>();
strList.Add("one");
strList.Add("two");
restRequest.AddBody(strList);
它似乎不喜欢泛型的序列化方式。 有什么建议应该如何将列表传递给请求?
【问题讨论】:
-
请展示一个简短但完整的示例来说明问题。这里的内容太少了。
标签: c# asp.net generics serialization restsharp