src/de/htwsaar/demo/Server/Demo.java
@Route(path = "/delete", method = "DELETE")
    public static void deleteData(Request req, Response res) throws IOException {
        String id = getId(req);
        if (id == null) {
            res.withStatusCode(Response.HTTP_BAD_REQUEST).text("Missing ID");
            return;
        }

        boolean ok = Database.getInstance().delete(id);

        if (!ok) {
            res.withStatusCode(Response.HTTP_NOT_FOUND).text("Key not found");
        }
        res.text("OK");
    }
/**
     * Deletes an existing entry in the dummy database; required arguments: id
     */
Deletes an existing entry in the dummy database; required arguments: id
Deletes an existing entry in the dummy database ; required arguments : id
@Route(path = "/delete", method = "DELETE")
    public static void deleteData(Request req, Response res) throws IOException {
        String id = getId(req);
        if (id == null) {
            res.withStatusCode(Response.HTTP_BAD_REQUEST).text("Missing ID");
            return;
        }
        boolean ok = Database.getInstance().delete(id);
        if (!ok) {
            res.withStatusCode(Response.HTTP_NOT_FOUND).text("Key not found");
        }
        res.text("OK");
    }
@ Route ( path = "/delete" , method = "DELETE" ) public static void deleteData ( Request req , Response res ) throws IOException { String id = getId ( req ) ; if ( id == null ) { res . withStatusCode ( Response . HTTP_BAD_REQUEST ) . text ( "Missing ID" ) ; return ; } boolean ok = Database . getInstance ( ) . delete ( id ) ; if ( ! ok ) { res . withStatusCode ( Response . HTTP_NOT_FOUND ) . text ( "Key not found" ) ; } res . text ( "OK" ) ; }
Deletes an existing entry in the dummy database; required arguments: id
Deletes an existing entry in the dummy database ; required arguments : id