put<T> method
Future<T?>
put<T>(
- String url, {
- Object? data,
- Options? options,
- CancelToken? cancelToken,
- ProgressCallback? onSendProgress,
- ProgressCallback? onReceiveProgress,
inherited
Make a PUT request
Implementation
Future<T?> put<T>(
String url, {
Object? data,
Options? options,
CancelToken? cancelToken,
ProgressCallback? onSendProgress,
ProgressCallback? onReceiveProgress,
}) async {
if (T.toString() == 'dynamic') {
return await network(
request: (request) => request.postUri(Uri.parse(url),
data: data,
options: options,
cancelToken: cancelToken,
onSendProgress: onSendProgress,
onReceiveProgress: onReceiveProgress),
);
}
return await network<T>(
request: (request) => request.putUri(Uri.parse(url),
data: data,
options: options,
cancelToken: cancelToken,
onSendProgress: onSendProgress,
onReceiveProgress: onReceiveProgress),
);
}