I'm using Koush Ion on Android to handle net operations. I'd like to add a common handler to handle 401 unauthorized error. How i can do it?
thank you
Ion.with(this)
.load("http://google.com")
.asString()
.withResponse()
.setCallback(new FutureCallback<Response<String>>() {
@Override
public void onCompleted(Exception e, Response<String> result) {
if(result.getHeaders().code()){
// ............
}
}
});
goodluck!