DELETE method

The DELETE method is used to send a deletion message to the server to remove the resource specified in the request-URI. This method can be overridden on the origin server. The client can receive a status from the server indicating the successful operation, but it cannot be guaranteed. It will be the job of the developer to guarantee the correct operation in the service. The developer must operate to delete the resource or move it to an unaccessible location.

The client will receive a status response: 200 (OK) if the operation results successfully, 202 (accepted) if the action was accepted but not yet been executed, or 204 (no content) if the response does not return the deleted entity, and also if the action has been successfully executed.

If the request runs in a cache and the URI of the request identifies cached entities, those entries must be considered as stale. Responses for this method must not be cacheable.

This is a simple override of the DELETE method through JAX-RS:

@DELETE
@Path("/delete")
@Produces(MediaType.TEXT_PLAIN)
public double delete() {
return 99.66;
}
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.165.180