示例#1
0
        public async System.Threading.Tasks.Task <string> ApiGetAvailableGame(string TID)
        {
            string strMdD5 = hashMD5.HashGameAvailable(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.PostAsync("System/Api/" + API_KEY + "/Game/List/?&TID=" + TID + "&Hash=" + strMdD5, null));
                if (response.IsSuccessStatusCode)
                {
                    return(response.Content.ReadAsStringAsync().Result);
                }
                return(null);
            }
        }