I'm currently using HttpWebRequest
to get a website. I'd like to use the await pattern, which is not given for HttpWebRequests
. I found the class HttpClient
, which seems to be the new Http worker class. I'm using HttpClient.GetAsync(...)
to query my webpage. But I'm missing the option to add ClientCredentials
like HttpWebRequest.Credentials
. Is there any way to give the HttpClient
authentication information?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…