|
From: Christian S. <chr...@gm...> - 2008-06-05 15:38:59
|
The HttpClientInvoker throws a RuntimeException when a status other then SC_OK is returned by the executed method. What if the method returns Response.created(uri).build()? Why should the HttpClientInvoker throw an exception in case of SC_CREATED (201)? In general how do I check if the request went well? Is there a way to retrieve the http status code on the client? Thanks, Christian |
|
From: Bill B. <bb...@re...> - 2008-06-05 16:00:32
|
I haven't put a lot of thought into this. I guess have two things: 1. Allow return of a Response object in the client framework. 2. An method annotation that says that the return value is a status code @StatusCode or something 3. Allow returning a Response.Status enum 4. Throw a WebApplicationExceptoin iif, the response falls into an error code bucket. Thoughts? Christian Sadilek wrote: > The HttpClientInvoker throws a RuntimeException when a status other then > SC_OK is returned by the executed method. What if the method returns > Response.created(uri).build()? Why should the HttpClientInvoker throw an > exception in case of SC_CREATED (201)? > > In general how do I check if the request went well? Is there a way to > retrieve the http status code on the client? > > Thanks, > Christian > > > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > > > ------------------------------------------------------------------------ > > _______________________________________________ > Resteasy-developers mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-developers -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |
|
From: Bill B. <bb...@re...> - 2008-06-05 16:03:01
|
I've created a JIRA issue for this: http://jira.jboss.com/jira/browse/RESTEASY-50 I'm doing a JUG presentation on JAX-RS next thursday and I want to get a new release out by then. There's a few minor bugs people have found, like this, that I want to fix. Thanks for your patience. I'll pop you an email if I commit something before the release so you can get code from SVN if you can't wait for this. Bill Bill Burke wrote: > I haven't put a lot of thought into this. I guess have two things: > > 1. Allow return of a Response object in the client framework. > 2. An method annotation that says that the return value is a status code > @StatusCode or something > 3. Allow returning a Response.Status enum > 4. Throw a WebApplicationExceptoin iif, the response falls into an error > code bucket. > > Thoughts? > > > > > > Christian Sadilek wrote: >> The HttpClientInvoker throws a RuntimeException when a status other >> then SC_OK is returned by the executed method. What if the method >> returns Response.created(uri).build()? Why should the >> HttpClientInvoker throw an exception in case of SC_CREATED (201)? >> >> In general how do I check if the request went well? Is there a way to >> retrieve the http status code on the client? >> >> Thanks, >> Christian >> >> >> >> >> >> ------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------- >> Check out the new SourceForge.net Marketplace. >> It's the best place to buy or sell services for >> just about anything Open Source. >> http://sourceforge.net/services/buy/index.php >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Resteasy-developers mailing list >> Res...@li... >> https://lists.sourceforge.net/lists/listinfo/resteasy-developers > -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |
|
From: Christian S. <chr...@gm...> - 2008-06-05 16:34:18
|
1. is the way I originally hoped it would work. To have the response object available on the client would be beautiful. It would offer easy access to the status and entity. thanks, Christian 2008/6/5 Bill Burke <bb...@re...>: > I haven't put a lot of thought into this. I guess have two things: > > 1. Allow return of a Response object in the client framework. > 2. An method annotation that says that the return value is a status code > @StatusCode or something > 3. Allow returning a Response.Status enum > 4. Throw a WebApplicationExceptoin iif, the response falls into an error > code bucket. > > Thoughts? > > > > > > Christian Sadilek wrote: > >> The HttpClientInvoker throws a RuntimeException when a status other then >> SC_OK is returned by the executed method. What if the method returns >> Response.created(uri).build()? Why should the HttpClientInvoker throw an >> exception in case of SC_CREATED (201)? >> >> In general how do I check if the request went well? Is there a way to >> retrieve the http status code on the client? >> >> Thanks, >> Christian >> >> >> >> >> >> ------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------- >> Check out the new SourceForge.net Marketplace. >> It's the best place to buy or sell services for >> just about anything Open Source. >> http://sourceforge.net/services/buy/index.php >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Resteasy-developers mailing list >> Res...@li... >> https://lists.sourceforge.net/lists/listinfo/resteasy-developers >> > > -- > Bill Burke > JBoss, a division of Red Hat > http://bill.burkecentral.com > |
|
From: Bill B. <bb...@re...> - 2008-06-05 17:29:07
|
I think I'm going to have to define my own Response interface/class.
The problem with Response is that it has no type information within it
so I have no idea how to unmarshal the returned entity/messagebody.
Plus all the set() methods it has doesn't make sense, it should be
immutable.
I'm thinking:
package org.resteasy;
public interface ClientResponse<T>
{
<T> T getEntity();
MultivaluedMap<String, String> getHeaders();
int getStatus();
}
I'll fool around with something today and get back to you.
Bill
Christian Sadilek wrote:
> 1. is the way I originally hoped it would work. To have the response
> object available on the client would be beautiful. It would offer easy
> access to the status and entity.
>
> thanks,
> Christian
>
> 2008/6/5 Bill Burke <bb...@re... <mailto:bb...@re...>>:
>
> I haven't put a lot of thought into this. I guess have two things:
>
> 1. Allow return of a Response object in the client framework.
> 2. An method annotation that says that the return value is a status
> code @StatusCode or something
> 3. Allow returning a Response.Status enum
> 4. Throw a WebApplicationExceptoin iif, the response falls into an
> error code bucket.
>
> Thoughts?
>
>
>
>
>
> Christian Sadilek wrote:
>
> The HttpClientInvoker throws a RuntimeException when a status
> other then SC_OK is returned by the executed method. What if the
> method returns Response.created(uri).build()? Why should the
> HttpClientInvoker throw an exception in case of SC_CREATED (201)?
>
> In general how do I check if the request went well? Is there a
> way to retrieve the http status code on the client?
>
> Thanks,
> Christian
>
>
>
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Resteasy-developers mailing list
> Res...@li...
> <mailto:Res...@li...>
> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
>
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
>
>
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
|
|
From: Bill B. <bb...@re...> - 2008-06-05 20:43:06
|
Ok, I committed something. You can either put a resteasy ClientResponse<yourType> as the response, or Response.Status. The latter is just access to the status code. Its in SVN trunk if you want to testdrive, otherwise, I'll just do another release next week sometime. Here's some links to code and examples: http://resteasy.svn.sourceforge.net/svnroot/resteasy/trunk/jaxrs/resteasy-jaxrs/src/main/java/org/resteasy/spi/ClientResponse.java http://resteasy.svn.sourceforge.net/svnroot/resteasy/trunk/jaxrs/resteasy-jaxrs/src/test/java/org/resteasy/test/finegrain/client/ClientResponseTest.java Christian, I'd be very interested in further ideas you have for improving things on the Client framework. Bill Burke wrote: > I think I'm going to have to define my own Response interface/class. > The problem with Response is that it has no type information within it > so I have no idea how to unmarshal the returned entity/messagebody. > Plus all the set() methods it has doesn't make sense, it should be > immutable. > > I'm thinking: > > package org.resteasy; > > public interface ClientResponse<T> > { > <T> T getEntity(); > MultivaluedMap<String, String> getHeaders(); > int getStatus(); > } > > I'll fool around with something today and get back to you. > > Bill > > Christian Sadilek wrote: >> 1. is the way I originally hoped it would work. To have the response >> object available on the client would be beautiful. It would offer easy >> access to the status and entity. >> >> thanks, >> Christian >> >> 2008/6/5 Bill Burke <bb...@re... <mailto:bb...@re...>>: >> >> I haven't put a lot of thought into this. I guess have two things: >> >> 1. Allow return of a Response object in the client framework. >> 2. An method annotation that says that the return value is a status >> code @StatusCode or something >> 3. Allow returning a Response.Status enum >> 4. Throw a WebApplicationExceptoin iif, the response falls into an >> error code bucket. >> >> Thoughts? >> >> >> >> >> >> Christian Sadilek wrote: >> >> The HttpClientInvoker throws a RuntimeException when a status >> other then SC_OK is returned by the executed method. What if the >> method returns Response.created(uri).build()? Why should the >> HttpClientInvoker throw an exception in case of SC_CREATED (201)? >> >> In general how do I check if the request went well? Is there a >> way to retrieve the http status code on the client? >> >> Thanks, >> Christian >> >> >> >> >> >> ------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------- >> Check out the new SourceForge.net Marketplace. >> It's the best place to buy or sell services for >> just about anything Open Source. >> http://sourceforge.net/services/buy/index.php >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Resteasy-developers mailing list >> Res...@li... >> <mailto:Res...@li...> >> https://lists.sourceforge.net/lists/listinfo/resteasy-developers >> >> >> -- >> Bill Burke >> JBoss, a division of Red Hat >> http://bill.burkecentral.com >> >> > -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |
|
From: Christian S. <chr...@gm...> - 2008-06-06 10:37:36
|
Ok, tested both and it works just great! I think this should be useful to a lot of people. The next weeks I'll do some more work using RESTeasy and will provide further feedback. Thanks, Christian 2008/6/5 Bill Burke <bb...@re...>: > Ok, I committed something. You can either put a resteasy > ClientResponse<yourType> as the response, or Response.Status. The latter is > just access to the status code. Its in SVN trunk if you want to testdrive, > otherwise, I'll just do another release next week sometime. > > Here's some links to code and examples: > > > http://resteasy.svn.sourceforge.net/svnroot/resteasy/trunk/jaxrs/resteasy-jaxrs/src/main/java/org/resteasy/spi/ClientResponse.java > > > http://resteasy.svn.sourceforge.net/svnroot/resteasy/trunk/jaxrs/resteasy-jaxrs/src/test/java/org/resteasy/test/finegrain/client/ClientResponseTest.java > > > Christian, I'd be very interested in further ideas you have for improving > things on the Client framework. > > > Bill Burke wrote: > >> I think I'm going to have to define my own Response interface/class. The >> problem with Response is that it has no type information within it so I have >> no idea how to unmarshal the returned entity/messagebody. Plus all the set() >> methods it has doesn't make sense, it should be immutable. >> >> I'm thinking: >> >> package org.resteasy; >> >> public interface ClientResponse<T> >> { >> <T> T getEntity(); >> MultivaluedMap<String, String> getHeaders(); >> int getStatus(); >> } >> >> I'll fool around with something today and get back to you. >> >> Bill >> >> Christian Sadilek wrote: >> >>> 1. is the way I originally hoped it would work. To have the response >>> object available on the client would be beautiful. It would offer easy >>> access to the status and entity. >>> >>> thanks, >>> Christian >>> >>> 2008/6/5 Bill Burke <bb...@re... <mailto:bb...@re...>>: >>> >>> I haven't put a lot of thought into this. I guess have two things: >>> >>> 1. Allow return of a Response object in the client framework. >>> 2. An method annotation that says that the return value is a status >>> code @StatusCode or something >>> 3. Allow returning a Response.Status enum >>> 4. Throw a WebApplicationExceptoin iif, the response falls into an >>> error code bucket. >>> >>> Thoughts? >>> >>> >>> >>> >>> >>> Christian Sadilek wrote: >>> >>> The HttpClientInvoker throws a RuntimeException when a status >>> other then SC_OK is returned by the executed method. What if the >>> method returns Response.created(uri).build()? Why should the >>> HttpClientInvoker throw an exception in case of SC_CREATED (201)? >>> >>> In general how do I check if the request went well? Is there a >>> way to retrieve the http status code on the client? >>> >>> Thanks, >>> Christian >>> >>> >>> >>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> >>> ------------------------------------------------------------------------- >>> Check out the new SourceForge.net Marketplace. >>> It's the best place to buy or sell services for >>> just about anything Open Source. >>> http://sourceforge.net/services/buy/index.php >>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Resteasy-developers mailing list >>> Res...@li... >>> <mailto:Res...@li...> >>> https://lists.sourceforge.net/lists/listinfo/resteasy-developers >>> >>> >>> -- Bill Burke >>> JBoss, a division of Red Hat >>> http://bill.burkecentral.com >>> >>> >>> >> > -- > Bill Burke > JBoss, a division of Red Hat > http://bill.burkecentral.com > |
|
From: Bill B. <bb...@re...> - 2008-06-06 12:47:52
|
Thanks Christian. Feedback is my most desired comodity! Christian Sadilek wrote: > Ok, tested both and it works just great! I think this should be useful > to a lot of people. The next weeks I'll do some more work using RESTeasy > and will provide further feedback. > > Thanks, > Christian > > 2008/6/5 Bill Burke <bb...@re... <mailto:bb...@re...>>: > > Ok, I committed something. You can either put a resteasy > ClientResponse<yourType> as the response, or Response.Status. The > latter is just access to the status code. Its in SVN trunk if you > want to testdrive, otherwise, I'll just do another release next week > sometime. > > Here's some links to code and examples: > > http://resteasy.svn.sourceforge.net/svnroot/resteasy/trunk/jaxrs/resteasy-jaxrs/src/main/java/org/resteasy/spi/ClientResponse.java > > http://resteasy.svn.sourceforge.net/svnroot/resteasy/trunk/jaxrs/resteasy-jaxrs/src/test/java/org/resteasy/test/finegrain/client/ClientResponseTest.java > > > Christian, I'd be very interested in further ideas you have for > improving things on the Client framework. > > > Bill Burke wrote: > > I think I'm going to have to define my own Response > interface/class. The problem with Response is that it has no > type information within it so I have no idea how to unmarshal > the returned entity/messagebody. Plus all the set() methods it > has doesn't make sense, it should be immutable. > > I'm thinking: > > package org.resteasy; > > public interface ClientResponse<T> > { > <T> T getEntity(); > MultivaluedMap<String, String> getHeaders(); > int getStatus(); > } > > I'll fool around with something today and get back to you. > > Bill > > Christian Sadilek wrote: > > 1. is the way I originally hoped it would work. To have the > response object available on the client would be beautiful. > It would offer easy access to the status and entity. > > thanks, > Christian > > 2008/6/5 Bill Burke <bb...@re... > <mailto:bb...@re...> <mailto:bb...@re... > <mailto:bb...@re...>>>: > > I haven't put a lot of thought into this. I guess have > two things: > > 1. Allow return of a Response object in the client framework. > 2. An method annotation that says that the return value > is a status > code @StatusCode or something > 3. Allow returning a Response.Status enum > 4. Throw a WebApplicationExceptoin iif, the response > falls into an > error code bucket. > > Thoughts? > > > > > > Christian Sadilek wrote: > > The HttpClientInvoker throws a RuntimeException when > a status > other then SC_OK is returned by the executed method. > What if the > method returns Response.created(uri).build()? Why > should the > HttpClientInvoker throw an exception in case of > SC_CREATED (201)? > > In general how do I check if the request went well? > Is there a > way to retrieve the http status code on the client? > > Thanks, > Christian > > > > > > > ------------------------------------------------------------------------ > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Resteasy-developers mailing list > Res...@li... > <mailto:Res...@li...> > <mailto:Res...@li... > <mailto:Res...@li...>> > > https://lists.sourceforge.net/lists/listinfo/resteasy-developers > > > -- Bill Burke > JBoss, a division of Red Hat > http://bill.burkecentral.com > > > > > -- > Bill Burke > JBoss, a division of Red Hat > http://bill.burkecentral.com > > -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |
|
From: Ian B. <ibu...@re...> - 2008-06-06 14:25:53
|
Bill, The early feedback I'd share with you is it would be great to be able to ask the RESTeasy runtime to return the exact URL of another resource. This is a follow on to a previous email I sent to the list. Without this I have to replicate the URL building 'scheme' from the values in my annotations. I really like to be able to send representations to clients with links. Cheers, Ian. On Jun 6, 2008, at 5:49 AM, Bill Burke wrote: > Thanks Christian. Feedback is my most desired comodity! > > Christian Sadilek wrote: >> Ok, tested both and it works just great! I think this should be >> useful >> to a lot of people. The next weeks I'll do some more work using >> RESTeasy >> and will provide further feedback. >> >> Thanks, >> Christian >> >> 2008/6/5 Bill Burke <bb...@re... <mailto:bb...@re...>>: >> >> Ok, I committed something. You can either put a resteasy >> ClientResponse<yourType> as the response, or Response.Status. The >> latter is just access to the status code. Its in SVN trunk if you >> want to testdrive, otherwise, I'll just do another release next >> week >> sometime. >> >> Here's some links to code and examples: >> >> http://resteasy.svn.sourceforge.net/svnroot/resteasy/trunk/jaxrs/resteasy-jaxrs/src/main/java/org/resteasy/spi/ClientResponse.java >> >> http://resteasy.svn.sourceforge.net/svnroot/resteasy/trunk/jaxrs/resteasy-jaxrs/src/test/java/org/resteasy/test/finegrain/client/ClientResponseTest.java >> >> >> Christian, I'd be very interested in further ideas you have for >> improving things on the Client framework. >> >> >> Bill Burke wrote: >> >> I think I'm going to have to define my own Response >> interface/class. The problem with Response is that it has no >> type information within it so I have no idea how to unmarshal >> the returned entity/messagebody. Plus all the set() methods it >> has doesn't make sense, it should be immutable. >> >> I'm thinking: >> >> package org.resteasy; >> >> public interface ClientResponse<T> >> { >> <T> T getEntity(); >> MultivaluedMap<String, String> getHeaders(); >> int getStatus(); >> } >> >> I'll fool around with something today and get back to you. >> >> Bill >> >> Christian Sadilek wrote: >> >> 1. is the way I originally hoped it would work. To have >> the >> response object available on the client would be >> beautiful. >> It would offer easy access to the status and entity. >> >> thanks, >> Christian >> >> 2008/6/5 Bill Burke <bb...@re... >> <mailto:bb...@re...> <mailto:bb...@re... >> <mailto:bb...@re...>>>: >> >> I haven't put a lot of thought into this. I guess have >> two things: >> >> 1. Allow return of a Response object in the client >> framework. >> 2. An method annotation that says that the return value >> is a status >> code @StatusCode or something >> 3. Allow returning a Response.Status enum >> 4. Throw a WebApplicationExceptoin iif, the response >> falls into an >> error code bucket. >> >> Thoughts? >> >> >> >> >> >> Christian Sadilek wrote: >> >> The HttpClientInvoker throws a RuntimeException >> when >> a status >> other then SC_OK is returned by the executed >> method. >> What if the >> method returns Response.created(uri).build()? Why >> should the >> HttpClientInvoker throw an exception in case of >> SC_CREATED (201)? >> >> In general how do I check if the request went well? >> Is there a >> way to retrieve the http status code on the client? >> >> Thanks, >> Christian >> >> >> >> >> >> >> >> ------------------------------------------------------------------------ >> >> >> >> ------------------------------------------------------------------------- >> Check out the new SourceForge.net Marketplace. >> It's the best place to buy or sell services for >> just about anything Open Source. >> http://sourceforge.net/services/buy/index.php >> >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Resteasy-developers mailing list >> Res...@li... >> <mailto:Res...@li...> >> <mailto:Res...@li... >> <mailto:Res...@li...>> >> >> https://lists.sourceforge.net/lists/listinfo/resteasy-developers >> >> >> -- Bill Burke >> JBoss, a division of Red Hat >> http://bill.burkecentral.com >> >> >> >> >> -- >> Bill Burke >> JBoss, a division of Red Hat >> http://bill.burkecentral.com >> >> > > -- > Bill Burke > JBoss, a division of Red Hat > http://bill.burkecentral.com > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Resteasy-developers mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-developers |
|
[Resteasy-developers] Links WAS e: RESTeasy Client Framework:
HttpResponseCodes in HttpClientInvoker
From: Bill B. <bb...@re...> - 2008-06-06 15:30:19
|
Having access to UriInfo within your client-side provider would solve your needs? You might have to expand on exactly what you mean though. Ian Butcher wrote: > Bill, > > The early feedback I'd share with you is it would be great to be able to > ask the RESTeasy runtime to return the exact URL of another resource. > This is a follow on to a previous email I sent to the list. Without > this I have to replicate the URL building 'scheme' from the values in my > annotations. I really like to be able to send representations to > clients with links. > > Cheers, > > Ian. > > On Jun 6, 2008, at 5:49 AM, Bill Burke wrote: > >> Thanks Christian. Feedback is my most desired comodity! >> >> Christian Sadilek wrote: >>> Ok, tested both and it works just great! I think this should be useful >>> to a lot of people. The next weeks I'll do some more work using RESTeasy >>> and will provide further feedback. >>> >>> Thanks, >>> Christian >>> >>> 2008/6/5 Bill Burke <bb...@re... <mailto:bb...@re...>>: >>> >>> Ok, I committed something. You can either put a resteasy >>> ClientResponse<yourType> as the response, or Response.Status. The >>> latter is just access to the status code. Its in SVN trunk if you >>> want to testdrive, otherwise, I'll just do another release next week >>> sometime. >>> >>> Here's some links to code and examples: >>> >>> >>> http://resteasy.svn.sourceforge.net/svnroot/resteasy/trunk/jaxrs/resteasy-jaxrs/src/main/java/org/resteasy/spi/ClientResponse.java >>> >>> >>> >>> http://resteasy.svn.sourceforge.net/svnroot/resteasy/trunk/jaxrs/resteasy-jaxrs/src/test/java/org/resteasy/test/finegrain/client/ClientResponseTest.java >>> >>> >>> >>> Christian, I'd be very interested in further ideas you have for >>> improving things on the Client framework. >>> >>> >>> Bill Burke wrote: >>> >>> I think I'm going to have to define my own Response >>> interface/class. The problem with Response is that it has no >>> type information within it so I have no idea how to unmarshal >>> the returned entity/messagebody. Plus all the set() methods it >>> has doesn't make sense, it should be immutable. >>> >>> I'm thinking: >>> >>> package org.resteasy; >>> >>> public interface ClientResponse<T> >>> { >>> <T> T getEntity(); >>> MultivaluedMap<String, String> getHeaders(); >>> int getStatus(); >>> } >>> >>> I'll fool around with something today and get back to you. >>> >>> Bill >>> >>> Christian Sadilek wrote: >>> >>> 1. is the way I originally hoped it would work. To have the >>> response object available on the client would be beautiful. >>> It would offer easy access to the status and entity. >>> >>> thanks, >>> Christian >>> >>> 2008/6/5 Bill Burke <bb...@re... >>> <mailto:bb...@re...> <mailto:bb...@re... >>> <mailto:bb...@re...>>>: >>> >>> I haven't put a lot of thought into this. I guess have >>> two things: >>> >>> 1. Allow return of a Response object in the client >>> framework. >>> 2. An method annotation that says that the return value >>> is a status >>> code @StatusCode or something >>> 3. Allow returning a Response.Status enum >>> 4. Throw a WebApplicationExceptoin iif, the response >>> falls into an >>> error code bucket. >>> >>> Thoughts? >>> >>> >>> >>> >>> >>> Christian Sadilek wrote: >>> >>> The HttpClientInvoker throws a RuntimeException when >>> a status >>> other then SC_OK is returned by the executed method. >>> What if the >>> method returns Response.created(uri).build()? Why >>> should the >>> HttpClientInvoker throw an exception in case of >>> SC_CREATED (201)? >>> >>> In general how do I check if the request went well? >>> Is there a >>> way to retrieve the http status code on the client? >>> >>> Thanks, >>> Christian >>> >>> >>> >>> >>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> >>> >>> ------------------------------------------------------------------------- >>> >>> Check out the new SourceForge.net Marketplace. >>> It's the best place to buy or sell services for >>> just about anything Open Source. >>> http://sourceforge.net/services/buy/index.php >>> >>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Resteasy-developers mailing list >>> Res...@li... >>> <mailto:Res...@li...> >>> <mailto:Res...@li... >>> <mailto:Res...@li...>> >>> >>> >>> https://lists.sourceforge.net/lists/listinfo/resteasy-developers >>> >>> >>> -- Bill Burke >>> JBoss, a division of Red Hat >>> http://bill.burkecentral.com >>> >>> >>> >>> >>> -- >>> Bill Burke >>> JBoss, a division of Red Hat >>> http://bill.burkecentral.com >>> >>> >> >> -- >> Bill Burke >> JBoss, a division of Red Hat >> http://bill.burkecentral.com >> >> ------------------------------------------------------------------------- >> Check out the new SourceForge.net Marketplace. >> It's the best place to buy or sell services for >> just about anything Open Source. >> http://sourceforge.net/services/buy/index.php >> _______________________________________________ >> Resteasy-developers mailing list >> Res...@li... >> https://lists.sourceforge.net/lists/listinfo/resteasy-developers > -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |