delete method
Sends a DELETE request to endpoint.
body is automatically JSON-encoded if it's a Map or List.
Pass a String to send raw.
Implementation
Future<http.Response?> delete(
String endpoint, {
Object? body,
Map<String, String>? extraHeaders,
}) {
final uri = _buildUri(endpoint);
final encoded = _encodeBody(body);
return _execute(
uri,
BifrostHttpMethod.delete,
(h) => client.delete(uri, body: encoded, headers: h),
extraHeaders: extraHeaders,
requestPayloadSize: encoded?.length,
);
}