http.delete
Sends a HTTP DELETE request to any URL using Axios.
Parameters
| Parameter | Description |
|---|---|
| url: string | Target URL |
| config?: object | Axios HTTP configuration for sending HTTP headers, setting up a proxy, etc. (Optional) |
Returns
Promise resolved with an object containing status, statusText, headers, and data from the Axios response. The response body is in data.
Examples
Deletes an entity using a REST API endpoint
module.exports = async function(payload, actions, context) {
await actions.http.delete('http://my.api.com/things/1');
console.log('deleted a thing with id=1');
}