Beispiel #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
                }));
            }
        }
        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
                });
            }
        }
Beispiel #3
0
        public object Post(ProcessControlRequest request)
        {
            var response = PostAsync(request).Result;

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

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