Ejemplo n.º 1
0
        private async Task <ControlResponse> PostAsync(ProcessControlRequest request)
        {
            var pathInfo = PathInfo.Parse(Request.PathInfo);
            var id       = pathInfo.GetArgumentValue <string>(2);

            using (var reader = new StreamReader(request.RequestStream))
            {
                return(_contentDirectory.ProcessControlRequest(new ControlRequest
                {
                    Headers = GetRequestHeaders(),
                    InputXml = await reader.ReadToEndAsync().ConfigureAwait(false),
                    TargetServerUuId = id
                }));
            }
        }
Ejemplo n.º 2
0
        private async Task<ControlResponse> PostAsync(ProcessControlRequest request)
        {
            var pathInfo = PathInfo.Parse(Request.PathInfo);
            var id = pathInfo.GetArgumentValue<string>(2);

            using (var reader = new StreamReader(request.RequestStream))
            {
                return _contentDirectory.ProcessControlRequest(new ControlRequest
                {
                    Headers = GetRequestHeaders(),
                    InputXml = await reader.ReadToEndAsync().ConfigureAwait(false),
                    TargetServerUuId = id
                });
            }
        }
Ejemplo n.º 3
0
        public object Post(ProcessControlRequest request)
        {
            var response = PostAsync(request).Result;

            return(ResultFactory.GetResult(response.Xml, "text/xml"));
        }
Ejemplo n.º 4
0
        public object Post(ProcessControlRequest request)
        {
            var response = PostAsync(request).Result;

            return ResultFactory.GetResult(response.Xml, "text/xml");
        }