title: Is it wrong to pass an object to the @DELETE API path?
body: <p>I am creating a REST API using Java. Is it wrong if I pass an object to the <code>@DELETE</code> path? In the case below, I have passed an 'User' object rather than passing an UserID. Is it wrong?</p>
  <pre><code>@DELETE
  @Path(&quot;delete_user&quot;)
  @Produces(MediaType.TEXT_PLAIN)
  @Consumes(MediaType.APPLICATION_JSON)
  public String deleteUser(User user) {
      System.out.println(&quot;Called delete&quot;);
      DatabaseDriver db = new DatabaseDriver();
      Boolean status = db.deleteUser(user);
      if (status) {
          System.out.println(&quot;Deleted &quot; + user.getUsername());
          return &quot;True&quot;;
      }
      else {
          System.out.println(&quot;Couldn't delete &quot; + user.getUsername());
          return &quot;False&quot;;
      }
  }
  </code></pre>