users@jersey.java.net

HTTP response of void method

From: Felipe Gaúcho <fgaucho_at_gmail.com>
Date: Sun, 10 May 2009 20:51:23 +0200

in the example below, a DELETE operation runs successfully on the
server side, it works, but the response is

"HTTP/1.1 204 No Content"

while I was expecting an HTTP 200

otherwise, how the client will know the operation was completed with success?



curl -v -H "Accept:application/json" -X DELETE
http://fgaucho.dyndns.org:8080/footprint-service/user/delete/23
* About to connect() to fgaucho.dyndns.org port 8080 (#0)
* Trying 77.56.86.149... connected
* Connected to fgaucho.dyndns.org (77.56.86.149) port 8080 (#0)
> DELETE /footprint-service/user/delete/23 HTTP/1.1
> User-Agent: curl/7.18.2 (i486-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.10
> Host: fgaucho.dyndns.org:8080
> Accept:application/json
>
< HTTP/1.1 204 No Content
< X-Powered-By: Servlet/2.5
< Server: Sun Java System Application Server 9.1_02
< Date: Sun, 10 May 2009 18:48:52 GMT
<
* Connection #0 to host fgaucho.dyndns.org left intact
* Closing connection #0