[jax-rs-spec users] Why no WebApplicationException in JAX-RS client post(), only for post(x,y)?

From: <>
Date: Mon, 12 Oct 2015 14:53:45 +0000 (UTC)


When using JAX-RS client calls with e.g.
        target.path("...").request().post(obj, String.class);
a WebApplicationException is thrown if the HTTP status code of the
result does
not equal Family.SUCCESSFULL. This is convenient as I don't have to
the HTTP result code of every single call myself.

When using just .post(null), because I'm not interested in the result
body, that Exception is not thrown, even if the server replies with
"500 internal error"!

What is the rationale for this?

best regards