@Test public void testDelete() { Response response = client.target(Main.uri + "u1") .request() .delete(); assertEquals(204, response.getStatus()); }
@DELETE @Path("/{id}") public Response delete(@PathParam("id") String id) { try { store.delete(id); } catch (IOException e) { e.printStackTrace(); return Response.serverError().build(); } return Response.noContent().build(); }
SampleResource { @DELETE @Path("/{id}") public Response delete(@PathParam("id") String id) { try { store.delete(id); } catch (IOException e) { e.printStackTrace(); return Response.serverError().build(); } return Response.noContent().build(); } }
SampleResource { @DELETE @Path("/{id}") public Response delete(@PathParam("id") String id) { try { store.delete(id); } catch (IOException e) { e.printStackTrace(); return Response.serverError().build(); } return Response.noContent().build(); }  }
SampleResource { @DELETE @Path("/{id}") public Response delete(@PathParam("id") String id) { try { store.delete(id); } catch (IOException e) { e.printStackTrace(); return Response.serverError().build(); } return Response.noContent().build(); }  @GET @Path("/{id}") @Produces("application/json") Response get(@PathParam("id") String id); @POST @Consumes("application/json") Response post(JsonNode node); @PUT @Path("/{id}") @Produces("application/json") @Consumes("application/json") Response put(@PathParam("id") String id, JsonNode node); @DELETE @Path("/{id}") Response delete(@PathParam("id") String id); }
SampleResource { @DELETE @Path("/{id}") public Response delete(@PathParam("id") String id) { try { store.delete(id); } catch (IOException e) { e.printStackTrace(); return Response.serverError().build(); } return Response.noContent().build(); }  @GET @Path("/{id}") @Produces("application/json") Response get(@PathParam("id") String id); @POST @Consumes("application/json") Response post(JsonNode node); @PUT @Path("/{id}") @Produces("application/json") @Consumes("application/json") Response put(@PathParam("id") String id, JsonNode node); @DELETE @Path("/{id}") Response delete(@PathParam("id") String id);  }