有没有办法同步使用restsharp?我在 Visual Studio 中看到的每个方法都有“异步”后缀和 restsharp 主页(其中有以下示例):
// execute the request
RestResponse response = client.Execute(request);
var content = response.Content; // raw content as string
明确区分同步请求和异步请求:
// easy async support
client.ExecuteAsync(request, response => {
Console.WriteLine(response.Content);
});
如何访问此“执行”同步方法?
最佳答案
我在他们的 googlegroups 中询问,他们说这是因为使用 wp7 时存在“平台限制”。很整洁吧?
关于c# - RestSharp 执行同步,而不是异步,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13731691/