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

            return(new HttpClient(msgHandler));
        }