Skip to content

Instantly share code, notes, and snippets.

@ssmccoy
Created November 12, 2015 19:13
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 ssmccoy/608eda959ab77e64afe3 to your computer and use it in GitHub Desktop.
Save ssmccoy/608eda959ab77e64afe3 to your computer and use it in GitHub Desktop.
Arrays.asList(nodes).stream().map((uri) ->
CompletableFuture.supplyAsync(() ->
new JSONObject(httpClient.get(uri))
).thenApply((json) -> json.get(“status”))
).map((status) -> status.get())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment