Source:
<code>public @ResponseBody ResponseEntity<?> export( @ApiParam(value = "The branch path", required = true) @PathVariable(value="path") final String branch, final SnomedRf2ExportConfiguration params, @ApiParam(value = "Accepted language tags, in order of preference") @RequestHeader(value=HttpHeaders.ACCEPT_LANGUAGE, defaultValue="en-US;q=0.8,en-GB;q=0.6", required=false) final String acceptLanguage) { final Rf2RefSetExportLayout globalExportLayout = ApplicationContext.getServiceForClass(SnomedCoreConfiguration.class).getExport().getRefSetExportLayout(); final ExportResult exportedFile = SnomedRequests.rf2().prepareExport() .setReleaseType(params.getType()) .setExtensionOnly(params.isExtensionOnly()) .setLocales(acceptLanguage) .setIncludePreReleaseContent(params.isIncludeUnpublished()) .setModules(params.getModuleIds()) .setRefSets(params.getRefSetIds()) .setCountryNamespaceElement(params.getNamespaceId()) .setTransientEffectiveTime(params.getTransientEffectiveTime()) .setStartEffectiveTime(params.getStartEffectiveTime()) .setEndEffectiveTime(params.getEndEffectiveTime()) .setRefSetExportLayout(params.getRefSetLayout() == null ? globalExportLayout : params.getRefSetLayout()) .build(this.repositoryId, branch) .execute(getBus()) <START> .getSync(); <END> final File file = ((InternalAttachmentRegistry) attachments).getAttachment(exportedFile.getRegistryId()); final Resource exportZipResource = new FileSystemResource(file); final HttpHeaders httpHeaders = new HttpHeaders(); httpHeaders.setContentType(MediaType.APPLICATION_OCTET_STREAM); httpHeaders.setContentDispositionFormData("attachment", exportedFile.getName()); file.deleteOnExit(); return new ResponseEntity<>(exportZipResource, httpHeaders, HttpStatus.OK); }</code><technical_language>wait for results here? is currently configured timeout value</technical_language>

Target:
public @ResponseBody ResponseEntity<?> export( @ApiParam(value = "The branch path", required = true) @PathVariable(value="path") final String branch, final SnomedRf2ExportConfiguration params, @ApiParam(value = "Accepted language tags, in order of preference") @RequestHeader(value=HttpHeaders.ACCEPT_LANGUAGE, defaultValue="en-US;q=0.8,en-GB;q=0.6", required=false) final String acceptLanguage) { final Rf2RefSetExportLayout globalExportLayout = ApplicationContext.getServiceForClass(SnomedCoreConfiguration.class).getExport().getRefSetExportLayout(); final ExportResult exportedFile = SnomedRequests.rf2().prepareExport() .setReleaseType(params.getType() == null ? null : Rf2ReleaseType.getByNameIgnoreCase(params.getType())) .setExtensionOnly(params.isExtensionOnly()) .setLocales(acceptLanguage) .setIncludePreReleaseContent(params.isIncludeUnpublished()) .setModules(params.getModuleIds()) .setRefSets(params.getRefSetIds()) .setCountryNamespaceElement(params.getNamespaceId()) .setTransientEffectiveTime(params.getTransientEffectiveTime()) .setStartEffectiveTime(params.getStartEffectiveTime()) .setEndEffectiveTime(params.getEndEffectiveTime()) .setRefSetExportLayout(params.getRefSetLayout() == null ? globalExportLayout : Rf2RefSetExportLayout.getByNameIgnoreCase(params.getRefSetLayout())) .build(this.repositoryId, branch) .execute(getBus()) .getSync(); final File file = ((InternalAttachmentRegistry) attachments).getAttachment(exportedFile.getRegistryId()); final Resource exportZipResource = new FileSystemResource(file); final HttpHeaders httpHeaders = new HttpHeaders(); httpHeaders.setContentType(MediaType.APPLICATION_OCTET_STREAM); httpHeaders.setContentDispositionFormData("attachment", exportedFile.getName()); file.deleteOnExit(); return new ResponseEntity<>(exportZipResource, httpHeaders, HttpStatus.OK); }