AuScGen.CommonUtilityPlugin.HttpRestClient.getRequest C# (CSharp) Method

getRequest() public method

Gets the request.
public getRequest ( string url, string>.Dictionary requestParamDic ) : List
url string The URL.
requestParamDic string>.Dictionary The request parameter dic.
return List
        public List<ResponseDataItem> getRequest(string url, Dictionary<string, string> requestParamDic)
        {
            httpGet = new HttpGet(new Uri(url));

            foreach (KeyValuePair<string, string> entry in requestParamDic)
            {
                httpGet.Parameters.Add(entry.Key, entry.Value);
            }
            //Get the response
            response = client.Execute(httpGet);
            //Get the response string
            string responseString = EntityUtils.ToString(response.Entity);
            //Get the Response Code and Save it
            string responseCode = response.ResponseCode.ToString();
            //Parse the response and return the values in the Dictionary
            Dictionary<String, String> responseCollection = null;
            if (responseCode == "200" && response != null)
            {
                //Console.WriteLine("Received the response" + responseString);
                responseCollection = new Dictionary<string, string>();
            }
            else
            {
                //Console.WriteLine("No Result returned");
            }
            return GetData(responseString);
        }