From 81563cdb647b8de014a59fdc7e17fcd5ebf4be6c Mon Sep 17 00:00:00 2001 From: mjkwiatkowski Date: Tue, 23 Jun 2026 13:31:05 +0200 Subject: feat: managed to successfully run experiment I --- .../src/main/kotlin/org/opendc/common/utils/HTTPClient.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'opendc-common/src/main/kotlin') diff --git a/opendc-common/src/main/kotlin/org/opendc/common/utils/HTTPClient.kt b/opendc-common/src/main/kotlin/org/opendc/common/utils/HTTPClient.kt index f8e5e120..3c8ae3c5 100644 --- a/opendc-common/src/main/kotlin/org/opendc/common/utils/HTTPClient.kt +++ b/opendc-common/src/main/kotlin/org/opendc/common/utils/HTTPClient.kt @@ -26,14 +26,16 @@ public class HTTPClient private constructor() { } } - public fun checkForInsights(){ + public fun checkForInsights() { val request = HttpRequest.newBuilder() - .uri(URI.create("http://localhost:1234/check")) + .uri(URI.create("http://localhost:1234/insight")) .header("Content-type", "text/plain") .GET() .build() val response = client?.send(request, ofString()) - check(response?.statusCode() == 200) + if (response?.body() != "null") { + println(response?.body()) + } } public fun sendExperiment(experiment: File) { -- cgit v1.2.3