Skip to main content

delete

delete

Performs an HTTP DELETE request on a resource.

Parameters

NameTypeDescription
urlStringThe URL to request
headersMap?Request headers. Optional (null). Merged into the default headers (Content-Type: application/json, Accept: application/json) before sending
jsCallbackJSFunction?The callback that receives the response

Callback

Invoked as jsCallback(statusCode, headers, body).

ArgumentTypeDescription
statusCodenumberThe response status code
headersMapThe response headers
bodyStringThe response body

Returns: void

Example

$http.delete("https://api.example.com/user/1", {}, function (status, headers, body) {
$log.d(status, body);
});