Fork me on GitHub Fork me on GitHub

del()


<%
var data = {'key':'value'}; 
var headers = {'key', 'value'};
del(url, data, "text", headers, function (data, xhr) {
       log("Response received");
   }
);
%>

Overview

del() is a wrapper for XMLHTTPRequest's DELETE method. using del() you can avoid the use of XHR and shorten the server-side DELETE requests

del(url[, data][, type][, headers][, success(data, xhr)])
var data = {'key':'value'};
var headers = {'key', 'value'};
del(url, data, "text", headers, function (data, xhr) {
	log("Response received");
});


Parameters

Parameter Type Description
urlStringThe URL which HTTP DELETE is performed
dataObjectRequest parameters
typeStringThe type, which the response is expected
headersStringOptional HTTP headers
success(data:Object,
xhr:Object)
functionOn success callback

Return values

Value Type Description
dataObjectContains the return data of the HTTP DELETE request
xhrObjectContains an instance of XMLHTTPRequest