delete

open override fun delete(body: JsonObject)

Sets the HTTP method to DELETE and optionally sets a JSON body.

DELETE requests typically don't include a body, but some APIs require one for bulk operations or to specify deletion criteria.

Parameters

body

Optional JSON body for the DELETE request. Defaults to an empty JSON object.


open override fun delete(contentType: String, body: String)

Sets the HTTP method to DELETE with custom content type and body.

DELETE requests typically don't have a body, but some APIs support it. This method allows specifying a custom Content-Type header along with the body content as a string.

Parameters

contentType

The Content-Type header value (e.g., "text/plain", "application/xml").

body

The request body as a string.

See also

For JSON DELETE requests.