I want to call Rest api see
http://developer.sheerid.com/docs/affiliationType/listAffiliationTypes.html[
^]
If i am calling this through curl command like this:
curl -3 -H "Authorization: Bearer 624a3eef46f79772958693fa87118b29" https://services-sandbox.sheerid.com/rest/0.5/affiliationType -k >ListAffiliationTypes.html pause
OUTPUT i get in application/json format:
["STUDENT_FULL_TIME","STUDENT_PART_TIME","FACULTY","EMPLOYEE","RESELLER","NON_PROFIT","ACTIVE_DUTY","VETERAN","MILITARY_FAMILY","MEMBER"]
Now i want to implement in asp.net C#. So that i could get all response in dropdown.
and use them further. I dont have any idea .. Please help me to solve issue..
I have tried following way to call..But it gives me the html format of SheerId Login Page
string sBaseUrl ="
https://services-sandbox.sheerid.com/rest/0.5/ping[
^]";
if (sBaseUrl != "")
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(sBaseUrl);
request.Method = "GET";
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
StreamReader reader = new StreamReader(response.GetResponseStream());
dvResult.InnerHtml = reader.ReadToEnd();
}
else
{
dvResult.InnerHtml = "
Please Enter base URL";
}