Advertisement
grook

Untitled

Jun 15th, 2021
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.60 KB | None | 0 0
  1. private void receiveIssueCreatedActivities() {
  2.     /* Формируем GET HTTP-запрос по ресурсу
  3.         /activites?category=IssueCreatedCategory
  4.     */
  5.     Mono<JsonNode[]> request = client.get()
  6.         .uri(uriBuilder -> uriBuilder
  7.             .path("/activites/")
  8.             .queryParam("category", "IssueCreatedCategory")
  9.             .build())
  10.         .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)
  11.         .retrieve()
  12.         .bodyToMono(JsonNode[].class);
  13.     JsonNode[] responseData = request.block();
  14.     for (JsonNode item:responseData) {
  15.         receivedEventData.put(item);
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement