users@jersey.java.net

[Jersey] Re: processing Response returned from Resource method

From: <richardl_at_ufp.com>
Date: Wed, 12 Oct 2011 07:27:44 -0700 (PDT)

The standard paradigm I generally use for resource methods looks like this:



The 'someObject' marshals as XML or JSON or whatever I need to the client
just fine. In this one particular case in the same resource file, I am
calling 'fooMethod' directly and getting the Response object. I need to
figure out if the response was 200 or 400 (BAD_REQUEST) and if 200, see into
the someObject. It looks to me as if ResponseImpl gives me some of that. I
was wondering if there was another, better, way to do this?

r

--
View this message in context: http://jersey.576304.n2.nabble.com/processing-Response-returned-from-Resource-method-tp6883669p6885234.html
Sent from the Jersey mailing list archive at Nabble.com.