diff options
| author | mjkwiatkowski <mati.rewa@gmail.com> | 2026-06-23 13:31:05 +0200 |
|---|---|---|
| committer | mjkwiatkowski <mati.rewa@gmail.com> | 2026-06-23 13:31:05 +0200 |
| commit | 81563cdb647b8de014a59fdc7e17fcd5ebf4be6c (patch) | |
| tree | 631cd8ff1f3f77d29739c7e1a06347a327caa7e7 /opendc-common | |
| parent | ca0c72789ba87791829001d259000b2966d9d6e4 (diff) | |
feat: managed to successfully run experiment I
Diffstat (limited to 'opendc-common')
| -rw-r--r-- | opendc-common/src/main/kotlin/org/opendc/common/utils/HTTPClient.kt | 8 |
1 files changed, 5 insertions, 3 deletions
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) { |
