send<T> method

Future<Response<T>> send<T>(
  1. Request<T> request
)

Implementation

Future<Response<T>> send<T>(Request<T> request) async {
  try {
    var response = await _performRequest<T>(() => Future.value(request));
    return response;
  } on Exception catch (e) {
    if (!errorSafety) {
      throw GetHttpException(e.toString());
    }
    return Future.value(Response<T>(
      statusText: 'Can not connect to server. Reason: $e',
    ));
  }
}