export_khttp library

Classes

EmptyParam
IdParam
IThrowHandler
异常处理类
KHttpConfig
http 配置信息
KHttpPlatform
http动态配置
KHttpServer
ResultDto<T>
ResultListDto<T>
TokenIntercepter
添加token
TokenParam

Functions

krequest<T>(Future<Response> request(), {dynamic onSuccess(T?)?, dynamic onFail(String?, String?, Exception)?}) Future<void>
请求数据,,返回data数据为原始数据类型
krequestBool(Future<Response> request(), {dynamic onSuccess(bool)?, dynamic onFail(String?, String?, Exception)?, bool isThrowEx = true}) Future<void>
请求数据,返回bool数据,接口调用成功就返回结果
krequestBoolFuture(Future<Response> request(), {dynamic onFail(String?, String?, Exception)?, bool isThrowEx = true}) Future<bool>
请求数据,返回bool数据,接口调用成功就返回结果
krequestFuture<T>(Future<Response> request(), {dynamic onFail(String?, String?, Exception)?}) Future<T?>
请求数据,,返回data数据为原始数据类型
krequestFutureList<T>(Future<Response> request(), T fromJsonT(dynamic json), {dynamic onFail(String?, String?, Exception)?}) Future<List<T>?>
请求数据,返回集合
krequestFutureT<T>(Future<Response> request(), T fromJsonT(dynamic json), {dynamic onFail(String?, String?, Exception)?}) Future<T?>
请求数据,返回data数据为对象
krequestList<T>(Future<Response> request(), T fromJsonT(dynamic json), {dynamic onSuccess(List<T>?)?, dynamic onFail(String?, String?, Exception)?}) Future<void>
请求数据,返回集合
krequestT<T>(Future<Response> request(), T fromJsonT(dynamic json), {dynamic onSuccess(T?)?, dynamic onFail(String?, String?, Exception)?}) Future<void>
请求数据,返回data数据为对象

Exceptions / Errors

BizException
自定义业务异常