deleteUser static method

Future<ParseUserResponse> deleteUser(
  1. String id,
  2. String token
)

deletes user with id if provided session token is valid

Implementation

static Future<ParseUserResponse> deleteUser(String id, String token) async {
  // ignore: omit_local_variable_types
  final Map<String, String> tmpHead = {}
    ..addAll(_headers)
    ..['X-Parse-Session-Token'] = token;
  var response = await http.delete('$_url/parse/users/$id', headers: tmpHead);
  _errorHandler(response);
  return ParseUserResponse(response.statusCode == 200, DateTime.now());
}