Example #1
0
        public static async Task <TResponse> SendAsync <TResponse, TRequest>(this HttpClient http, string uri, TRequest item, string authName, string authPass)
        {
            http.AddDefaultRequestHeader(authName, authPass);

            return(await http.SendAsync <TResponse, TRequest>(uri, item));
        }
Example #2
0
        public static async Task <TResponse> FetchAsync <TResponse>(this HttpClient http, string uri, string authName, string authPass)
        {
            http.AddDefaultRequestHeader(authName, authPass);

            return(await http.FetchAsync <TResponse>(uri));
        }