@DELETE

The HTTP DELETE method deletes the resource pointed by the URI. The @javax.ws.rs.DELETE annotation designates the method of a resource class to respond to the HTTP DELETE requests.

The following code snippet shows how you can use the @DELETE annotation to designate the removeDepartment() method to respond to the HTTP DELETE request. The department ID is passed as the path variable in this example:

@DELETE 
@Path("{id}") 
public void removeDepartment(@PathParam("id") Short id) { 
  //remove department entity from data store 
  removeDepartmentEntity(id); 
} 
..................Content has been hidden....................

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