deleteSync method

Future<T> deleteSync({
  1. required TGDeleteRequest request,
})

Implementation

Future<T> deleteSync({required TGDeleteRequest request}) async {
  try {
    Uri uri = Uri.parse(request.getUrl());
    TGLog.t("DELETE", uri);
    final httpRes = await _getClient(request.getUri(), "DELETE").delete(
      uri,
      body: request.body(),
      headers: request.headers(),
    );
    return Future.value(_prepareResponse(httpRes));
  } catch (error) {
    T t = _populateExceptionResponse(error);
    return Future.value(t);
  }
}