Skip to content

Instantly share code, notes, and snippets.

@radutoev
Created March 14, 2018 20:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save radutoev/9749184aac292155d368517216d12665 to your computer and use it in GitHub Desktop.
Save radutoev/9749184aac292155d368517216d12665 to your computer and use it in GitHub Desktop.
@GetMapping
public CompletableFuture<ResponseEntity> get() {
logger.info("GET request");
return myService.callBAsync().thenApply(status ->
status.equals("ok") ?
ResponseEntity.ok().build() :
ResponseEntity.badRequest().build());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment