getServiceCapabilities method

Future<Capabilities> getServiceCapabilities()

Returns the capabilities of the imaging service. The result is returned in a typed answer.

Access Class: PRE_AUTH

Implementation

Future<Capabilities> getServiceCapabilities() async {
  loggy.debug('getServiceCapabilities');

  final responseEnvelope = await transport.request(
      uri,
      soap.Body(
        request: ImagingRequest.getServiceCapabilities(),
      ));

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

  return GetServiceCapabilitiesResponse.fromJson(
          responseEnvelope.body.response!)
      .capabilities;
}