public static Created ( string locationUrl ) : |
||
locationUrl | string | |
return |
public static WorkflowHttpResponse Created(string locationUrl)
{
var response = new WorkflowHttpResponse(HttpStatusCode.Created);
response.Headers.Add(HttpResponseHeader.Location, locationUrl);
return response;
}
private void HandleWorkItem(WorkItemNode workItemNode) { var workItem = workItemNode.GetWorkItem(_path); if (!_workflow.ExistsWorkItem(workItem.Id)) { _workflow.CreateWorkItem(workItem); Response = WorkflowHttpResponse.Created(workItem.Path); } else { _workflow.UpdateWorkItem(workItem); Response = WorkflowHttpResponse.Ok; } }