verifyHost method

Future<bool> verifyHost()

Implementation

Future<bool> verifyHost() async {
  var _msg = '';
  String action = '';
  if (Oph.curPreset.hostguid != '' && Oph.curPreset.hostguid != null) {
    action = 'verifyhost' + '&guid=' + Oph.curPreset.hostguid!;
  }
  var url = Oph.curPreset.serverURL! +
      Oph.curPreset.rootAccountId! +
      '/' +
      Oph.curPreset.apiURL! +
      '?suba=' +
      Oph.curPreset.accountId! +
      '&mode=' +
      action;
  isLoading = true;
  String value = await httpSvc.getXML(url);
  XmlDocument xmlDoc = XmlDocument.parse(value);
  //menu
  _msg = xmlDoc.findAllElements('message').single.firstChild.toString();

  return (_msg == '2');
}