getHealth method
General node health check request. See: https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getHealth
Implementation
Future<GetHealthResponse> getHealth() async {
JsonRpcMethod getHealth = JsonRpcMethod("getHealth");
dio.Response response = await _dio.post(_serverUrl,
data: json.encode(getHealth), options: dio.Options(headers: _headers));
if (enableLogging) {
print("getHealth response: $response");
}
return GetHealthResponse.fromJson(response.data);
}