request<T> method

  1. @override
T request<T>(
  1. String endpoint,
  2. Map<String, dynamic> params,
  3. RequestContext? context
)
override

Implementation

@override
T request<T>(
    String endpoint, Map<String, dynamic> params, RequestContext? context) {
  var type = TypeAgent<T>();
  if (type.isA<Future>()) {
    return type
        .mapAs1<Future>(<T>() => _request<T>(endpoint, params, context));
  }
  throw 'Only endpoints that expect Futures are supported.';
}