Sunday 15 August 2010

rest - Android: How to get the JSON object returned in case of an exception using RoboSpice -


I am using RoboSpice to access some comfort services, I am returning a JSON object when everything OK and in the case of an exception, I am returning a JSON object describing the nature of an HTTP error code and exception. When I'm doing everything fine, then I'm able to get the JSON object, but I'm only able to get the exception and the http error code, but I'm not JSON, just came back in the case of an exception. And I can get everything in every case, how does this know how to use any robobospice? Well I'm using Jackson and Spring. Thanks!

Take a look at the method explained to block HTTP status for a failed request. / P>

Please note that there is a getResponseBodyAsString () method in HttpClientErrorException that you should help to read JSON responses

No comments:

Post a Comment