我在我的ASP.NET MVC Web应用程序中有以下WebClient:
using (WebClient wc = new WebClient()) // call the Third Party API to get the account id
{
string url = currentURL + "resources/" + ResourceID + "/accounts?AUTHTOKEN=" + pmtoken;
var json = await wc.DownloadStringTaskAsync(url);
}
请问有谁能指导我如何将代码中的 WebClient
更改为 HttpClient
吗?