I have web rest services which take one parameter that is studentID and bring back with the student record. I am having difficulty in order to pass parameter to service and its literately not happening
string StudentByPeopleCodeServiceURL = https://agentwebservices.ac.uk/Rest/Modules/15427/Screens/U_LookUps/Data/StudentByCode
parameter that I need to pass is
{PeopeCode}= 307242
and code is
HttpWebRequest _Request = (System.Net.HttpWebRequest)WebRequest.Create(string.Format(StudentByPeopleCodeServiceURL));
try
{
_Request.Method = "GET";
_Request.ContentType = "text/xml";
_Request.Accept = "text/xml";
_Request.UserAgent = "Mozilla/4.0+(compatible;+MSIE+5.01;+Windows+NT+5.0";
_Request.Headers.Add(HttpRequestHeader.AcceptLanguage, "en-us");
_Request.Headers.Add(HttpRequestHeader.Authorization, token.EBS_Token);
HttpWebResponse _Response = _Request.GetResponse() as HttpWebResponse;
_WebServiceStatus.ResponseStatusCode = _Response.StatusCode;
_WebServiceStatus.ResponseContentLength = _Response.ContentLength;
_WebServiceStatus.ResponseContentType = _Response.ContentType;
//rest of code
i have tried passing parameter in url like ?PeopeCode= 307242 but it is not working. The Rest API is external and I don't have any control on it
Many thanks in advance