当使用 System.Net.Http.HttpClient 调用休息服务时,我有类似的代码
var response = client.GetAsync("api/MyController").Result;
if(response.IsSuccessStatusCode)
...
那是正确的还是我应该这样做
client.GetAsync("api/MyController").ContinueWith(task => { var response = task.Result; ...}