Skip to content
Snippets Groups Projects

chore[aou-1869]: refactor export bibliograpy endpoint

Merged Homada.Boumedane requested to merge aou-1869_update_export_bibliograpy_controller into master
1 unresolved thread

refactor controller to return a stream instead of string.

Closes: AOU-1869

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
114 118 if (!results.getContent().isEmpty()) {
115 119 result = this.exportMetadataService.exportMetadata(exportFormat, results.getContent());
116 120 }
121
117 122 HttpHeaders headers = this.getHeaders(exportFormat);
118 return new ResponseEntity<>(result, headers, HttpStatus.OK);
123
124 // convert the string result to Inputstream
125 InputStream is = new BufferedInputStream(new ByteArrayInputStream(result.getBytes(StandardCharsets.UTF_8)));
126
127 // build the responseBody as stream
128 StreamingResponseBody responseBody = outputStream -> {
  • added 4 commits

    Compare with previous version

  • Please register or sign in to reply
    Loading