diff options
Diffstat (limited to 'opendc-common/src/main/kotlin/org/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) { |
