瀏覽代碼

curl test

herlanS_ 3 年之前
父節點
當前提交
51ed253c4d
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/main/kotlin/co/id/datacomsolusindo/ipphonebridge/IpPhoneBridgeApplication.kt

+ 1 - 1
src/main/kotlin/co/id/datacomsolusindo/ipphonebridge/IpPhoneBridgeApplication.kt

@@ -63,7 +63,7 @@ fun main(args: Array<String>) {
 
     val command = "curl -X GET https://${System.getenv("KUBERNETES_SERVICE_HOST")}:${System.getenv("KUBERNETES_PORT_443_TCP_PORT")}/api/v1/namespaces/tm-bridge/pods/${System.getenv("HOSTNAME")}"
     val process: Process = Runtime.getRuntime().exec(command)
-    println(process.inputStream.readAllBytes())
+    println(String(process.inputStream.readAllBytes()))
 }
 
 class Client(