I have an application which is calling an GET API for getting some reports. Here is my code
HttpWebRequest myHttpWebRequest = null;
HttpWebResponse myHttpWebResponse = null;
myHttpWebRequest = (HttpWebRequest)HttpWebRequest.Create("https://cybersource.com/DownloadReport/2015/11/04/profile/TransactionDetailReport.xml");
myHttpWebRequest.Method = "GET";
myHttpWebRequest.ContentType = "text/xml; encoding='utf-8'";
string authInfo = "username:password";
authInfo = Convert.ToBase64String(Encoding.Default.GetBytes(authInfo));
myHttpWebRequest.Headers.Add("Authorization", "Basic " + authInfo);
myHttpWebResponse = (HttpWebResponse)myHttpWebRequest.GetResponse();
I went through plenty of articles and did lot of changes here and there but still i am getting 400 bad request
Just for my curiosity I used a wrong username and password but still I am getting the same error 400 bad request
What is missing or wrong in my request?