httr (version 0.3)

DELETE: Send a DELETE request.

Description

Send a DELETE request.

Usage

DELETE(url = NULL, config = list(), ..., handle = NULL)

Arguments

url
the url of the page to retrieve
config
Additional configuration settings such as http authentication (authenticate), additional headers (add_headers), cookies (
...
Further parameters, such as query, path, etc, passed on to modify_url. These parameters must be named.
handle
The handle to use with this request. If not supplied, will be retrieved and reused from the handle_pool based on the scheme, hostname and port of the url. By default httr requests to th

RFC2616

The DELETE method requests that the origin server delete the resource identified by the Request-URI. This method MAY be overridden by human intervention (or other means) on the origin server. The client cannot be guaranteed that the operation has been carried out, even if the status code returned from the origin server indicates that the action has been completed successfully. However, the server SHOULD NOT indicate success unless, at the time the response is given, it intends to delete the resource or move it to an inaccessible location.

A successful response SHOULD be 200 (OK) if the response includes an entity describing the status, 202 (Accepted) if the action has not yet been enacted, or 204 (No Content) if the action has been enacted but the response does not include an entity.

If the request passes through a cache and the Request-URI identifies one or more currently cached entities, those entries SHOULD be treated as stale. Responses to this method are not cacheable.

See Also

Other http methods: BROWSE; GET; HEAD

Examples

Run this code
b <- new_bin()
DELETE(b)

DELETE("http://httpbin.org/delete")
POST("http://httpbin.org/delete")

Run the code above in your browser using DataCamp Workspace