getNotifyHealth method
Reports that the notify send surface is mounted.
Reports that the notify send surface is mounted. It is a pure liveness probe: it answers 200 whenever this subsystem is mounted and checks nothing downstream, so an "ok" here says the routes are reachable, not that any provider credential is configured. The body is notifyd's verbatim, so probes and clients that keyed on the standalone service keep working unchanged.
Implementation
Future<NotifyHealth?> getNotifyHealth() async {
final response = await getNotifyHealthWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'NotifyHealth',) as NotifyHealth;
}
return null;
}