Skip to content

Instantly share code, notes, and snippets.

@mchmielarz
Created December 17, 2018 21:20
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 mchmielarz/b22f708962bdab300a4be971e340e75a to your computer and use it in GitHub Desktop.
Save mchmielarz/b22f708962bdab300a4be971e340e75a to your computer and use it in GitHub Desktop.
Call Airly service
private Try<String> callAirly(URI airlyUri) {
HttpRequest req = requestBuilder.uri(airlyUri).build();
return Try
.of(() -> httpClient.send(req, bodyHandler))
  .map(HttpResponse::body);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment