我的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);
}
Run Code Online (Sandbox Code Playgroud)
那么有人可以建议我如何将它从WebClient更改为HttpClient?