deleteSession static method

Future<void> deleteSession()

Implementation

static Future<void> deleteSession() async {
  final url = Uri.parse('${myConfig!.config.apiServerUrl}/deleteSession/');

  // <!-- http.Response response = await http.get(url);
  http.Client client = http.Client();
  if (client is BrowserClient) {
    logger.finest('client.withCredentials');
    client.withCredentials = true;
  }
  http.Response response = await client.get(url).catchError(
        (error, stackTrace) => throw HycopUtils.getHycopException(
          error: error,
          defaultMessage: 'client.get(deleteSession) Failed !!!',
        ),
      );
  // -->

  var responseBody = utf8.decode(response.bodyBytes);
  var jsonData = jsonDecode(responseBody);
  logger.finest('jsonData=$jsonData');
}