Advertisement
grook

Untitled

Jun 18th, 2021
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.62 KB | None | 0 0
  1. private void receiveCreateBranchData() {
  2.     /* Формируем GET HTTP-запрос по ресурсу
  3.     https://gitlab.com/projects/:id/repository/branches */
  4.     Mono<JsonNode> eventsRequest = client.get()
  5.         .uri(uriBuilder -> uriBuilder
  6.             .path("projects/:id/repository/branches/")
  7.             .build())
  8.         .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)
  9.         .retrieve()
  10.         .bodyToMono(JsonNode.class);
  11.     JsonNode[] responseData = eventsRequest.block();
  12.     for (JsonNode jsonNode:responseData) {
  13.         Pair<String, JsonNode> eventData = new Pair<>("create_branch", "jsonNode");
  14.         receivedEventData.put(item);
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement