给定以下 ASP.NET MVC 4 控制器操作:
public async Task<ActionResult> FooAsync()
{
using (var httpClient = new HttpClient())
{
var responseMessage = await httpClient.GetAsync("http://stackoverflow.com");
string response = await responseMessage.Content.ReadAsStringAsync();
return Content(response);
}
}
我是否需要在FooAsync中添加“Async”后缀才能异步运行该操作?