public async Task<string> ApplyChanges( IEnumerable<Document> docs )
{
...
}
出于调试目的,我想
docs
作为原始JSON,即反序列化之前的JSON。我知道我可以改变
JToken
但这还不足以满足我现在的需要。我真的需要看看实际的预反序列化JSON文本。
var request = Context.GetHttpContext().Request;
string content;
using ( var reader = new StreamReader( request.Body ) ) {
content = await reader.ReadToEndAsync();
}
Request
无济于事。