deleteRequest<T> method
Implementation
Future<HtpioResponse<T>> deleteRequest<T>({
required String endpoint,
required T Function(Map<String, dynamic>) fromJson,
String? authToken,
}) async {
Map<String, String> headers = {
'Content-Type': 'application/json',
if (authToken != null) 'Authorization': 'Bearer $authToken',
};
final request = HtpioRequest<T>(
url: endpoint,
method: 'DELETE',
headers: headers,
fromJson: fromJson,
);
return send(request);
}