protected override System.Net.WebRequest GetWebRequest(Uri uri) { string pass = "pass" + ":" + "****"; var key = Convert.ToBase64String(new System.Text.ASCIIEncoding().GetBytes(pass)); var basicKey= "Basic " + key; var getWebRequest = base.GetWebRequest(uri); getWebRequest.Headers.Add("authorization", basicKey); return getWebRequest; }
No comments:
Post a Comment