HTTP & JSON
httpDelete
$httpDelete[]
Performs an HTTP DELETE request to the specified URL and returns the response body as a string
Syntax
$httpDelete[url]
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| url | string | check_circle Required | — | The full URL of the resource to delete (including https://) |
Return Value
string
The response body as a plain text string. Often empty for successful deletions. Use $httpStatus to confirm the outcome.
$httpDelete sends a synchronous HTTP DELETE request to remove the resource identified by the URL. The response body is often empty or contains a confirmation message. Use $httpStatus to verify whether the deletion succeeded (typically a 200 or 204 status code). Custom headers such as Authorization can be set beforehand with $httpAddHeader.
Examples
Delete a resource
$httpDelete[https://jsonplaceholder.typicode.com/posts/1]
$if[$httpStatus==200]
$description[Resource deleted successfully]
$else
$description[Deletion failed with status: $httpStatus]
$endif
Delete with custom header
$httpAddHeader[Authorization;Bearer my-token-here]
$httpDelete[https://api.example.com/items/42]
$description[Status: $httpStatus — Response: $httpResult]