예제 #1
0
        public async System.Threading.Tasks.Task <string> ApiGetLobbyState(string TID, string table)
        {
            string strMdD5 = hashMD5.HashLobbyState(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 + "/Tables/LobbyState/?&Table=" + table + "&TID=" + TID + "&Hash=" + strMdD5, null));
                if (response.IsSuccessStatusCode)
                {
                    return(response.Content.ReadAsStringAsync().Result);
                }
                return(null);
            }
        }