Skip to content

Commit 9108cb4

Browse files
authored
Update CreateTopicDemo.java
Signed-off-by: SimiHunjan <simi.hunjan.k@gmail.com>
1 parent d77802b commit 9108cb4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/examples/java/CreateTopicDemo.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public static void main(String[] args ) throws Exception {
1313
String operatorId = System.getenv("OPERATOR_ID");
1414
String operatorKey = System.getenv("OPERATOR_KEY");
1515
String network = System.getenv().getOrDefault("HEDERA_NETWORK", "local"); // "local" for Solo
16-
String mirrorNodeUrl = System.getenv().getOrDefault(
16+
String mirrorNode = System.getenv().getOrDefault(
1717
"MIRROR_NODE_URL",
1818
"http://localhost:5551/api/v1" // Solo default (adjust if yours differs)
1919
);
@@ -54,7 +54,7 @@ public static void main(String[] args ) throws Exception {
5454
Thread.sleep(6000);
5555

5656
// query messages using Mirror Node
57-
String mirrorNodeUrl = "https://localhost:5551/api/v1/topics/" + topicId + "/messages";
57+
String mirrorNodeUrl = mirrorNode + topicId + "/messages";
5858

5959
HttpClient httpClient = HttpClient.newHttpClient( );
6060
HttpRequest request = HttpRequest.newBuilder()

0 commit comments

Comments
 (0)