fetchForwardDestinations method

  1. @override
Future<PiForwardDestinations> fetchForwardDestinations(
  1. CancelToken cancelToken
)
override

Retrieves forwarded DNS servers.

Implementation

@override
Future<PiForwardDestinations> fetchForwardDestinations(
    CancelToken cancelToken) async {
  try {
    final data =
        await _getSecure({'getForwardDestinations': ''}, cancelToken);

    final forwardDestinations = PiForwardDestinationsModel.fromJson(data);
    return forwardDestinations.entity;
  } on DioError catch (e) {
    throw _onDioError(e);
  }
}