@Override public void onSuccess(int statusCode, Headers headers, byte[] body) { String content = AVUtils.stringFromBytes(body); if (AVOSCloud.isDebugLogEnabled()) { LogUtil.avlog.d(content); } String contentType = PaasClient.extractContentType(headers); if (AVUtils.checkResponseType(statusCode, content, contentType, getCallback())) return; int code = AVErrorUtils.errorCode(content); if (code > 0) { if (getCallback() != null) { getCallback().onFailure(AVErrorUtils.createException(code, content), content); } return; } if (getCallback() != null) { getCallback().onSuccess(content, null); } // 在有请求成功的时候,安排一次archiveRequest发送。真正发起请求则是在之后的30秒后 ArchiveRequestTaskController.schedule(); }
@Override public void onSuccess(int statusCode, Header[] headers, byte[] body) { String content = AVUtils.stringFromBytes(body); if (InternalConfigurationController.globalInstance().getInternalLogger().isDebugEnabled()) { LogUtil.avlog.d(content); } String contentType = AVUtils.extractContentType(headers); if (AVUtils.checkResponseType(statusCode, content, contentType, getCallback())) return; int code = AVErrorUtils.errorCode(content); if (code > 0) { if (getCallback() != null) { getCallback().onFailure(AVErrorUtils.createException(content), content); } return; } if (getCallback() != null) { getCallback().onSuccess(content, null); } }
if (AVUtils.checkResponseType(statusCode, content, contentType, getCallback())) return; int code = AVErrorUtils.errorCode(content); if (code > 0) { if (getCallback() != null) {
return; int code = AVErrorUtils.errorCode(content); if (code > 0) { if (getCallback() != null) {