patch<T> method
PATCH 请求
@param url
请求地址
@param params
请求参数(可选)
@param options
请求额外设置,包括Header等(可选)
@param cancelToken
取消请求时使用的CancelToken(可选)
@param onSendProgress
请求上传进度回调方法(可选)
@param onReceiveProgress
请求响应进度回调方法(可选)
@param onSuccess
请求成功回调方法(可选)
@param onFailed
请求失败回调方法(可选)
@param onCommon
公共回调方法,成功和失败都会调用,在onSuccess和onFailed之前调用(可选)
Implementation
Future<dynamic> patch<T>(
String url, {
Map<String, dynamic>? params,
Options? options,
CancelToken? cancelToken,
ProgressCallback? onSendProgress,
ProgressCallback? onReceiveProgress,
OnSuccess? onSuccess,
OnFailed? onFailed,
OnCommon? onCommon,
dynamic bind,
}) async {
return _client!
.patch<T>(
_handleUrl(url, params),
data: _handleParams(url, params),
options: _bindCancelToken(options, bind),
cancelToken: cancelToken,
onSendProgress: onSendProgress,
onReceiveProgress: onReceiveProgress,
)
._handleCallback(onSuccess, onFailed, onCommon);
}