postAsync<T> method
Future<Response<T> >
postAsync<T>(
- String path, {
- dynamic data,
- Options? options,
- dynamic life,
- ProgressCallback? onSendProgress,
- ProgressCallback? onReceiveProgress,
Implementation
Future<Response<T>> postAsync<T>(String path, {data, Options? options, dynamic life, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) async {
if (life == null) life = DateTime.now().millisecondsSinceEpoch.toString();
var cancelToken = addLife(life);
Response<T> future = await _dio.post(path, data: data, options: options, onSendProgress: onReceiveProgress, onReceiveProgress: onReceiveProgress, cancelToken: cancelToken);
_removeLife(life);
return future;
}