I have an HttpClient that I am using for a REST API. However I am having trouble setting up the Authorization header. I need to set the header to the token I received from d
This may help Setting the header:
WebClient client = new WebClient(); string authInfo = this.credentials.UserName + ":" + this.credentials.Password; authInfo = Convert.ToBase64String(Encoding.Default.GetBytes(authInfo)); client.Headers["Authorization"] = "Basic " + authInfo;