StatusCode - 401 IsSuccessStatusCode - False ReasonPhrase - Unauthorized
var acadiaUrl = "https://uat.abc.com/marginqa"; HttpClientHandler handler = new HttpClientHandler(); HttpClient httpClient = new HttpClient(handler); var byteArray = Encoding.ASCII.GetBytes("username:password"); httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue ("Basic", Convert.ToBase64String(byteArray)); HttpResponseMessage response = await httpClient.GetAsync(acadiaUrl); HttpContent content = response.Content;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)