You have been redirected from an outdated version of the article. Below is the content available on this topic. To view the old article click here.

DELETE()

Usage

DELETE(url, contentType)
DELETE(url)

Description
Sends an HTTP DELETE request with an optional content type to the given url. This method can be used to make HTTP requests from within the Structr Server, triggered by a frontend control like a button etc.

The DELETE() method will return a response object with the following structure:

Field Description Type
status HTTP status of the request Integer
headers Response headers Map
body Response body Map or String

Note
Please note that the DELETE() method will not be executed in the security context of the current user. The request will be made by the Structr server, without any user authentication or additional information. If you want to access external protected resources, you will need to authenticate the request using add_header(). (see the related articles for more information)

Example

${DELETE('http://localhost:8082/structr/rest/User/6aa10d68569d45beb384b42a1fc78c50')}

results in

{body={code=401.0, message=Forbidden}, status=401, headers={Date=Tue, 22 Dec 2015 16:39:20 GMT, Content-Type=application/json; charset=utf-8, Content-Length=44, Server=Jetty(9.2.9.v20150224)}}

Search results for "DELETE()"

DELETE()

Sends an HTTP DELETE request with an optional content type to the given url. This method can be used to make HTTP requests from within the Structr Server, triggered by a frontend control like a button etc.

The DELETE() method will return a response object with the following structure:

Field Description Type
status HTTP status of the request Integer
headers Response headers Map
body Response body Map or String
DELETE(url [, contentType = 'application/json' ])

delete()

Deletes the given node(s) or relationship(s). This method takes multiple parameters (or a collection of objects) and returns an empty string. See also create().

delete(entity, ...)

application_store_delete()

Removes a stored value from the application level store.

application_store_delete(key)

request_store_delete()

Removes a stored value from the request level store.

request_store_delete(key)