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 }); } }
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"); }