get<T> function

Future<Response<T>> get<T>(
  1. String unencodedPath, {
  2. Protocol protocol = Protocol.https,
  3. String? service,
  4. Map<String, String>? headers,
  5. Map<String, dynamic>? parameters,
  6. Duration timeout = const Duration(seconds: 10),
  7. ResponseDataBuilder<T>? to,
  8. ResponseDataAdaptor? adaptor,
  9. GetClient? getClient,
  10. Client? client,
})

Implementation

Future<Response<T>> get<T>(
  final String unencodedPath, {
  final Protocol protocol = Protocol.https,
  final String? service,
  final Map<String, String>? headers,
  final Map<String, dynamic>? parameters,
  final Duration timeout = const Duration(seconds: 10),
  final type.ResponseDataBuilder<T>? to,
  final type.ResponseDataAdaptor? adaptor,
  final type.GetClient? getClient,
  final http.Client? client,
}) async => _buildResponse<T>(
  checkStatus(
    await util.executeGet(
      util
          .getUriFactory(protocol)
          .call(
            service ?? defaultService,
            unencodedPath,
            util.toQueryParameters(parameters),
          ),
      headers: headers,
      timeout: timeout,
      getClient: getClient,
      client: client,
    ),
  ),
  to,
  adaptor,
);