簡體   English   中英

RestSharp 執行同步,而不是異步

[英]RestSharp execute sync, not async

有沒有辦法同步使用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 時“平台限制”。 很整潔吧?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM