public interface ImHttpClientCallback
该接口主要用于在HTTP异步请求时的执行结果回调以及在异步/同步的相关业务控制
HTTP request callback interface class
This interface is mainly used for execution result callback during HTTP asynchronous request and related business control in asynchronous/synchronous
program: Sinlmao Commons Network Utils
description: HTTP请求回调接口类
create: 2019-11-09 15:16
ImRequest,
ImResponse| 限定符和类型 | 方法和说明 |
|---|---|
void |
onCallRequest(ImRequest imRequest)
HTTP请求时回调
Callback on HTTP request
|
void |
onComplete(ImRequest imRequest,
ImResponse imResponse)
HTTP请求完成时回调
仅在异步时才会执行
Callback when HTTP request is completed
Executed only when asynchronous
|
void |
onError(ImRequest imRequest,
Throwable throwable)
HTTP请求错误时回调
仅在异步时才会执行
|
void |
onSuccess(ImRequest imRequest,
ImResponse imResponse)
HTTP请求成功时回调
当前完成时指未发生任何错误时的完成,错误或异常的HTTP状态码(例如:404、500、401等)也会在此触发
仅在异步时才会执行
Callback when HTTP request succeeds
The current completion refers to the completion of any error, the error or abnormal HTTP status code (for example: 404, 500, 401, etc.) will also be triggered here.
|
void onCallRequest(ImRequest imRequest)
Callback on HTTP request
imRequest - ImRequest会话请求数据 void onError(ImRequest imRequest, Throwable throwable)
仅在异步时才会执行
imRequest - ImRequest会话请求数据 throwable - 错误/异常数据 void onSuccess(ImRequest imRequest, ImResponse imResponse)
当前完成时指未发生任何错误时的完成,错误或异常的HTTP状态码(例如:404、500、401等)也会在此触发
仅在异步时才会执行
Callback when HTTP request succeeds
The current completion refers to the completion of any error, the error or abnormal HTTP status code (for example: 404, 500, 401, etc.) will also be triggered here.
Executed only when asynchronous
imRequest - ImRequest会话请求数据 imResponse - ImResponse会话响应对象 void onComplete(ImRequest imRequest, ImResponse imResponse)
仅在异步时才会执行
Callback when HTTP request is completed
Executed only when asynchronous
imRequest - ImRequest会话请求数据 imResponse - ImResponse会话响应对象 Copyright © 2020. All rights reserved.