ping static method
Implementation
static Future<AppInstall> ping(PingRequest pingRequest) async {
final response = await _client.post(
Uri.parse('$_apiUrl/ping'),
body: json.encode(pingRequest.toJson()),
headers: {HttpHeaders.contentTypeHeader: 'application/json'},
);
if (response.statusCode == 200) {
return AppInstall.fromJson(json.decode(response.body));
} else {
throw Exception(
'Response code: ${response.statusCode}, ${response.body}',
);
}
}