// http请求: 返回整数
val num_face_this_node = (Json.parse(s"""curl --insecure -X GET -H 'Content-Type: application/json' https://${ip_port}/data/compute/count""" !!) \ "count").as[Long]
这里的json用了 play-json:
<!-- https://mvnrepository.com/artifact/com.typesafe.play/play-json -->
<dependency>
<groupId>com.typesafe.play</groupId>
<artifactId>play-json_2.12</artifactId>
<version>2.9.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.13.0</version>
</dependency>