I am new to rest api's and calling them via .NET
I have an api: https://sub.domain.com/api/operations?param=value¶m2=value
The notes for the api say that to authorize I need to use the basic access authentication - how do I do that?
I currently have this code:
WebRequest req = WebRequest.Create(@"https://sub.domain.com/api/operations?param=value¶m2=value");
req.Method = "GET";
//req.Credentials = new NetworkCredential("username", "password");
HttpWebResponse resp = req.GetResponse() as HttpWebResponse;
However I get a 401 unauthorized error.
What am I missing, how do I form api calls using the basic access auth?