A web client can delete an existing Atom entry from a collection
by making an HTTP DELETE request to the URL of the Atom entry, as
stated in the <atom:link rel="edit"> element of the entry.
About this task
You can only delete a single Atom entry from a collection
at a time, using the URL for an individual Atom entry. You cannot
delete a whole collection at once. CICS rejects DELETE requests made
to the URL of the collection.
Procedure
- Begin your HTTP DELETE request with a request line consisting of the method DELETE, followed by
the path component of the URL of the Atom entry, followed by HTTP/1.1, which
is the HTTP version for the request. You may also include the scheme (HTTP or HTTPS) and the host name in the URL.
- Write HTTP headers for the request as follows, each on
a new line:
- The Host header, giving the host name from the URL of the Atom
entry, if you did not already include the host name in the request
line.
- The Authorization header, with any security information required
to access your collection, such as a user ID and password for basic
authentication.
Put an additional carriage return line feed (CRLF)
after the last HTTP header to give an empty line. Do not
include any message body.
- Send your request to the server.
Results
When your request is accepted, the server sends an HTTP response
with the status code 200, indicating successful completion of the
request, or a suitable error response. The response does not contain
a copy of the deleted entry.
Example
This is a request to delete the Atom entry with the URL
http://www.example.com:80/web20/entry/10 :
DELETE /web20/entry/10 HTTP/1.1
Host: www.example.com:80