Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 Android 上使用Koush Ion来处理网络操作。我想添加一个通用处理程序来处理 401 未经授权的错误。我该怎么做?
谢谢你
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()){ // ............ } } });
祝你好运!