public static HTTP.HeaderData GetBasicHeader(Crendentials credentials)
        {
            string encoded = Convert.ToBase64String(Encoding.GetEncoding("ISO-8859-1").GetBytes(credentials.Username + ":" + credentials.Password));

            var header = new HTTP.HeaderData();
            header.Id = "Authorization";
            header.Text = "Basic " + encoded;
            return header;
        }
Пример #2
0
        public static HTTP.HeaderData GetBasicHeader(Crendentials credentials)
        {
            string encoded = Convert.ToBase64String(Encoding.GetEncoding("ISO-8859-1").GetBytes(credentials.Username + ":" + credentials.Password));

            var header = new HTTP.HeaderData();

            header.Id   = "Authorization";
            header.Text = "Basic " + encoded;
            return(header);
        }