postCached<T> method
Future<Response<T> >
postCached<T>(
- String path, {
- dynamic data,
- Map<
String, dynamic> ? queryParameters, - Options? options,
- CancelToken? cancelToken,
- ProgressCallback? onSendProgress,
- ProgressCallback? onReceiveProgress,
override
Gets locally saved last response from the path
Implementation
Future<Response<T>> postCached<T>(
String path, {
data,
Map<String, dynamic>? queryParameters,
Options? options,
CancelToken? cancelToken,
ProgressCallback? onSendProgress,
ProgressCallback? onReceiveProgress,
}) async {
final requestOptions = RequestOptions(
path: path,
queryParameters: queryParameters,
data: data,
headers: super.options.headers,
);
return Response(
requestOptions: requestOptions,
data: await _getDataFromCache(requestOptions),
);
}