Skip to content

Instantly share code, notes, and snippets.

@NikolayGorshkov
Created January 16, 2026 12:13
Show Gist options
  • Select an option

  • Save NikolayGorshkov/bf8f59f3a5424d7a8644062b7180e470 to your computer and use it in GitHub Desktop.

Select an option

Save NikolayGorshkov/bf8f59f3a5424d7a8644062b7180e470 to your computer and use it in GitHub Desktop.
article/loom/listing_1.java
String request_1() throws Exception {
String resultNum = requestService("http://localhost:8080/1");
return request_2(resultNum);
}
String request_2(String num) throws Exception {
String resultNum = requestService("http://localhost:8080/" + num);
return request_3(resultNum);
}
String request_3(String num) throws Exception {
return requestService("http://localhost:8080/" + num);
}
void main() throws Exception {
try {
String response = request_1();
IO.println(response);
} catch (Exception e) {
log.log(SEVERE, "Error calling service", e);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment