public IActionResult Post([FromBody] DocumentBulkSettings settings) { var contentLength = contextAccessor.HttpContext.Request.ContentLength; if (contentLength == null) { return(HttpErrorResult(StatusCodes.Status411LengthRequired, GlobalResources.ContentLengthIsNotSet)); } var results = documentService.Bulk( dataSetName, settings.Documents, contentLength.Value, parallelService.ParallelLimit); return(HttpObjectResult(StatusCodes.Status200OK, results)); }