Пример #1
0
        public async Task <HttpResponseMessage> SendRequestAsync(AuthenticatedRequest request)
        {
            using (var client = new HttpClient())
            {
                client.BaseAddress = server;

                var message = request.Create();
                var result  = await client.SendAsync(message);

                result.EnsureSuccessStatusCode();

                return(result);
            }
        }