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

            return(ResultFactory.GetResult(response.Xml, "text/xml"));
        }
コード例 #4
0
        public object Post(ProcessControlRequest request)
        {
            var response = PostAsync(request).Result;

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