/// <summary>
        /// Insert a request HTTP header
        /// </summary>
        /// <param name="header">A <see cref="System.Net.Http.Headers.HttpRequestHeaders"/> object on wich the request header will be recorded.</param>
        /// <param name="name">The header attribute name.</param>
        /// <param name="value">The header attribute value.</param>
        public void AddRequestHeader(HttpRequestHeaders header, string name, string value)
        {
            if (name.Equals("Authorization", StringComparison.OrdinalIgnoreCase))
            {
                header.Authorization = new AuthenticationHeaderValue(value);
            }

            else if (name.Equals("Cache-Control", StringComparison.OrdinalIgnoreCase))
            {
                header.CacheControl = CacheControlHeaderValue.Parse(value);
            }

            else if (name.Equals("Date", StringComparison.OrdinalIgnoreCase))
            {
                header.Date = DateTimeOffset.Parse(value);
            }

            else if (name.Equals("If-Modified-Since", StringComparison.OrdinalIgnoreCase))
            {
                header.IfModifiedSince = DateTimeOffset.Parse(value);
            }

            else if (name.Equals("If-Range", StringComparison.OrdinalIgnoreCase))
            {
                header.IfRange = RangeConditionHeaderValue.Parse(value);
            }

            else if (name.Equals("If-Unmodified-Since", StringComparison.OrdinalIgnoreCase))
            {
                header.IfUnmodifiedSince = DateTimeOffset.Parse(value);
            }

            else if (name.Equals("Max-Forwards", StringComparison.OrdinalIgnoreCase))
            {
                header.MaxForwards = int.Parse(value);
            }

            else if (name.Equals("Proxy-Authorization", StringComparison.OrdinalIgnoreCase))
            {
                header.ProxyAuthorization = AuthenticationHeaderValue.Parse(value);
            }

            else if (name.Equals("Range", StringComparison.OrdinalIgnoreCase))
            {
                header.Range = RangeHeaderValue.Parse(value);
            }

            else if (name.Equals("Referrer", StringComparison.OrdinalIgnoreCase))
            {
                header.Referrer = new Uri(value);
            }

            else
            {
                try{
                    header.Add(name, value);
                }catch (ArgumentException) {
                    if (header.GetType().GetProperty(name.Replace("-", "")) != null)
                    {
                        header.GetType().GetProperty(name.Replace("-", "")).SetValue(header, value);
                    }
                    else
                    {
                        throw;
                    }
                }
            }
        }