delete<T> method

Future<T?> delete<T>(
  1. String url,
  2. Object? data,
  3. Options? options,
  4. CancelToken? cancelToken,
)

Make a DELETE request

Implementation

Future<T?> delete<T>(String url, Object? data, Options? options,
    CancelToken? cancelToken) async {
  if (T.toString() == 'dynamic') {
    return await network(
      request: (request) => request.deleteUri(Uri.parse(url),
          data: data, options: options, cancelToken: cancelToken),
    );
  }
  return await network<T>(
    request: (request) => request.deleteUri(Uri.parse(url),
        data: data, options: options, cancelToken: cancelToken),
  );
}