public static String strGetHttpResponse(object query, string actionName /*, string logUser*/)
        {
            string resultContent = string.Empty;
            DTO    modal         = new DTO();

            modal.Status = JsonConvert.SerializeObject(query);

            using (var client = new HttpClient())
            {
                //string sEmailId = GetEmailId(logUser, actionName);
                string sEmailId = Email;
                client.BaseAddress = new Uri(BaseUrl);
                client.DefaultRequestHeaders.Accept.Clear();
                client.DefaultRequestHeaders.Add("AuthUser", Email);                //logUser
                client.DefaultRequestHeaders.Add("AuthCode", CABusinessProjectTrackingCrypt.EncryptString(AuthorizedCode + "||" + sEmailId));
                client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("text/json"));

                HttpResponseMessage response = client.PostAsync(SubUrl + actionName, new StringContent(JsonConvert.SerializeObject(modal), Encoding.UTF8, "application/json")).Result;
                response.EnsureSuccessStatusCode();
                if (response.IsSuccessStatusCode)
                {
                    resultContent = response.Content.ReadAsStringAsync().Result;
                }
            }
            return(resultContent);
        }
        public static T GetHttpResponse <T>(string querystring, string actionName /*, string logUser*/)
        {
            string loadUrl       = querystring == string.Empty ? SubUrl + actionName : SubUrl + actionName + querystring;
            T      resultContent = default(T);

            using (var client = new HttpClient())
            {
                //string sEmailId = GetEmailId(logUser, actionName);
                string sEmailId = Email;
                client.BaseAddress = new Uri(BaseUrl);
                client.DefaultRequestHeaders.Accept.Clear();
                client.DefaultRequestHeaders.Add("AuthUser", Email);                //logUser
                client.DefaultRequestHeaders.Add("AuthCode", CABusinessProjectTrackingCrypt.EncryptString(AuthorizedCode + "||" + sEmailId));
                client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("text/json"));

                HttpResponseMessage response = client.GetAsync(loadUrl).Result;
                response.EnsureSuccessStatusCode();
                if (response.IsSuccessStatusCode)
                {
                    resultContent = response.Content.ReadAsAsync <T>().Result;
                }
            }
            return(resultContent);
        }