コード例 #1
0
ファイル: MazeService.cs プロジェクト: gajo357/SaveThePony
        private async Task <HttpResponseMessage> MoveAsync(string mazeId, DirectionsEnum direction)
        {
            var template = new DirectionTemplate()
            {
                Direction = direction.ToString().ToLower()
            };

            var content = JsonConvert.SerializeObject(template);

            return(await HttpClient.PostAsync($"{ApiBaseWebsite}/{mazeId}", new StringContent(content, Encoding.UTF8, "application/json")));
        }