我正在寻找一种方法来访问AddBody调用的序列化结果。RestSharp获取序列化输出
我使用内置的RestSharp序列化程序。 实施例:
class Foo
{
public string FooField;
}
void SendRecord()
{
var f = new Foo();
f.FooField = "My Value";
request.AddBody(f);
// How do I get the serialized json result of the add body call without
// data? I would like to log the serialized output of the add body call to
// the database.
//Expected {"FooField":"My Value"}
var response = client.Execute(request);
}
请提供更多详细信息和代码示例。 – 1232133d2ffa
完成。更新后... – Nikoli