KDownloadRequest<TDecoded> class

Inheritance

Constructors

KDownloadRequest(KRestApi _api, {required String path, required dynamic savePath, bool usePrimary = true, Options? options, Map<String, dynamic>? queryParams, CancelToken? cancelToken, void onReceiveProgress(int, int)?, FileAccessMode fileAccessMode = FileAccessMode.write, bool deleteOnError = true, String lengthHeader = Headers.contentLengthHeader, LogOptions? logOptions, bool useBaseUrl = true, FutureOr<KDownloadRequest<TDecoded>> resolve(KDownloadRequest<TDecoded>)?})
KDownloadRequest.from(KRestRequest<TDecoded> r, {required dynamic savePath, String lengthHeader = Headers.contentLengthHeader, FutureOr<KDownloadRequest<TDecoded>> resolve(KDownloadRequest<TDecoded>)?})
factory

Properties

cancelToken CancelToken?
finalinherited
data Object?
finalinherited
decoder → TDecoded Function(dynamic data, Response _)?
Converts the raw Dio response payload into the client-facing output type. data == Response.data
finalinherited
deleteOnError bool
final
fileAccessMode FileAccessMode
final
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>?
It will replace the one in Options.headers, don't provide if you wish to use the one in the Options
finalinherited
lengthHeader String
final
logOptions LogOptions?
finalinherited
onReceiveProgress → void Function(int, int)?
finalinherited
options Options?
finalinherited
path String
finalinherited
queryParams Map<String, dynamic>?
finalinherited
resolve FutureOr<KDownloadRequest<TDecoded>> Function(KDownloadRequest<TDecoded>)?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
savePath → dynamic
final
transformedPath String
no setterinherited
useBaseUrl bool
Set to true by default. You can set to false if you don't want to append with the baseUrl from the parent KRestApiBase and want to provide a full URL in path instead. Doesn't have any effect if the KRestApiBase doesn't have a baseUrl configured, in which case the path is used as-is regardless of this flag.
finalinherited
usePrimary bool
finalinherited

Methods

copyWith({String? pathTransform(String)?, bool? usePrimary, dynamic savePath, Options? options, Map<String, dynamic>? queryParams, CancelToken? cancelToken, void onReceiveProgress(int, int)?, bool? deleteOnError, String? lengthHeader, FileAccessMode? fileAccessMode, LogOptions? logOptions, bool? useBaseUrl}) KDownloadRequest<TDecoded>
download() Future<void>
downloadResponse() Future<KResponse<dynamic, TDecoded>>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDeleteRequest() KDeleteRequest<TDecoded>
inherited
toDownloadRequest({required dynamic savePath}) KDownloadRequest<TDecoded>
inherited
toGetRequest() KGetRequest<TDecoded>
inherited
toPatchRequest() KPatchRequest<TDecoded>
inherited
toPostRequest() KPostRequest<TDecoded>
inherited
toPutRequest() KPutRequest<TDecoded>
inherited
toRequest() KRequest<TDecoded>
inherited
toString() String
A string representation of this object.
inherited
tryDownload() Future<void>
tryDownloadResponse() Future<KResponse<dynamic, TDecoded>>

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

method → const String