post<T> method
Make a POST request
Implementation
Future<T?> post<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.postUri(Uri.parse(url),
data: data,
options: options,
cancelToken: cancelToken,
onSendProgress: onSendProgress,
onReceiveProgress: onReceiveProgress),
);
}