healthCheck method

Future<ParseResponse> healthCheck({
  1. bool? debug,
  2. ParseClient? client,
  3. bool? sendSessionIdByDefault,
})

Implementation

Future<ParseResponse> healthCheck(
    {bool? debug, ParseClient? client, bool? sendSessionIdByDefault}) async {
  final bool _debug = isDebugEnabled(objectLevelDebug: debug);

  final ParseClient _client = client ??
      ParseCoreData().clientCreator(
          sendSessionId:
              sendSessionIdByDefault ?? ParseCoreData().autoSendSessionId,
          securityContext: ParseCoreData().securityContext);

  const String className = 'parseBase';
  const ParseApiRQ type = ParseApiRQ.healthCheck;

  try {
    final ParseNetworkResponse response =
        await _client.get('${ParseCoreData().serverUrl}$keyEndPointHealth');
    return handleResponse<Parse>(null, response, type, _debug, className);
  } on Exception catch (e) {
    return handleException(e, type, _debug, className);
  }
}