예제 #1
0
        /// <summary>
        /// Kill_Authorization
        /// option param: EXTPARAM chỉ xoá liên kết đến giá trị
        /// </summary>
        /// <param name="login"></param>
        /// <param name="TID"></param>
        /// <returns></returns>
        public async System.Threading.Tasks.Task <string> ApiKill_Authorization(string login, string TID)
        {
            string strMdD5 = hashMD5.Hash_Kill_Authorization(login, TID);

            using (var client = new HttpClient())
            {
                client.BaseAddress = new Uri(URL_API_FUNDIST);
                client.DefaultRequestHeaders.Accept.Clear();
                client.DefaultRequestHeaders.TryAddWithoutValidation("Content-Type", "application/json");
                HttpResponseMessage response = await client.GetAsync("System/Api/" + API_KEY + "/User/KillAuth/?&Login="******"&TID=" + TID + "&Hash=" + strMdD5);

                if (response.IsSuccessStatusCode)
                {
                    return(response.Content.ReadAsStringAsync().Result);
                }
                return(null);
            }
        }