Exemple #1
0
 public BasicAuthenticatedHttpMessageHandler(
     BasicAuthenticatedHttpClientOptions options)
 {
     _authorizationHeader = new AuthenticationHeaderValue(
         "Basic",
         BasicAuthenticatedHttpMessageHandler.GenerateAuthenticationParameter(options.UserId, options.Password));
 }
Exemple #2
0
        public static HttpClient GetClient(BasicAuthenticatedHttpClientOptions options)
        {
            var msgHandler = new BasicAuthenticatedHttpMessageHandler(options);

            return(new HttpClient(msgHandler));
        }