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; }
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); }