setNetworkDefaultGateway method

Future<bool> setNetworkDefaultGateway(
  1. NetworkGateway networkGateway
)

This operation sets the default gateway settings on a device.

Access Class: WRITE_SYSTEM

Implementation

Future<bool> setNetworkDefaultGateway(NetworkGateway networkGateway) async {
  loggy.debug('setNetworkDefaultGateway');

  final responseEnvelope = await transport.securedRequest(
    uri,
    soap.Body(
      request: DeviceManagementRequest.setNetworkDefaultGateway(
        networkGateway,
      ),
    ),
  );

  if (responseEnvelope.body.hasFault) {
    throw Exception(responseEnvelope.body.fault.toString());
  }

  return true;
}