private void ExpectSingleHeader(HttpProperties hp, string name, string value)
 {
     Assert.Equal(
         new List <KeyValuePair <string, string> >
     {
         new KeyValuePair <string, string>(name, value)
     },
         hp.BaseHeaders
         );
 }
        private static HttpMessageHandler DefaultHttpMessageHandlerFactory(HttpProperties props)
        {
#if NETCOREAPP2_1 || NET5_0
            return(new SocketsHttpHandler
            {
                ConnectTimeout = props.ConnectTimeout,
                Proxy = props.Proxy
            });
#else
            if (props.Proxy != null)
            {
                return(new HttpClientHandler {
                    Proxy = props.Proxy
                });
            }
            return(null);
#endif
        }