Been elaborating a bit with HttpClient for building a rest client. But I can\'t figure out, nor find any examples on how to authenticate towards the server. Most likely I wi
All these are out of date. The final way to do it is as follows:
var credentials = new NetworkCredential(userName, password);
var handler = new HttpClientHandler { Credentials = credentials };
using (var http = new HttpClient(handler))
{
// ...
}