KGetRequest<TDecoded> class

Inheritance
Available extensions

Constructors

KGetRequest(KRestApi _api, {required String path, bool usePrimary = true, bool useBaseUrl = true, Options? options, CancelToken? cancelToken, void onReceiveProgress(int, int)?, DecodedCallback<TDecoded>? decoder, LogOptions? logOptions, ErrorOverrideCallback? errorOverride})
KGetRequest.from(KRestRequest<TDecoded> r)
factory

Properties

cancelToken → CancelToken?
finalinherited
data → Object?
finalinherited
decoder → DecodedCallback<TDecoded>?
Converts the raw Dio response payload into the client-facing output type. data == Response.data
finalinherited
errorOverride → ErrorOverrideCallback?
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
headers → Map<String, Object?>?
Replaces Options.headers. Omit to keep what's in options.
finalinherited
logOptions → LogOptions?
finalinherited
method → String
no setter
onReceiveProgress → void Function(int, int)?
finalinherited
options → Options?
finalinherited
path → String
finalinherited
queryParams → Map<String, dynamic>?
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
transformedPath → String
no setterinherited
useBaseUrl → bool
Set to true by default. Set to false to use path as a full URL, bypassing the parent KRestApiBase.baseUrl. Has no effect when the parent has no baseUrl configured.
finalinherited
usePrimary → bool
finalinherited

Methods

catchErrorOnSend() → Future<TDecoded?>

Available on KRestRequest<TDecoded>, provided by the ExtOnRestRequest extension

Executes the request safely and directly returns the decoded payload, yielding null on failure.
catchErrorOnSendResponse<Raw>() → Future<KResponse<Raw, TDecoded>>

Available on KRestRequest<TDecoded>, provided by the ExtOnRestRequest extension

Executes the request safely, returning errors in the KResponse rather than throwing.
catchErrorOnSendResult() → Future<ApiResult<TDecoded?>>

Available on KRestRequest<TDecoded>, provided by the ExtOnRestRequest extension

Executes the request safely and returns an ApiResult, capturing any error cleanly.
copyWith({String? pathTransform(String)?, bool? usePrimary, Map<String, String>? headers, Object? data, Map<String, dynamic>? queryParams, Options? options, CancelToken? cancelToken, void onReceiveProgress(int, int)?, LogOptions? logOptions, bool? useBaseUrl, DecodedCallback<TDecoded>? decoder, ErrorOverrideCallback? errorOverride}) → KGetRequest<TDecoded>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
send() → Future<TDecoded?>

Available on KRestRequest<TDecoded>, provided by the ExtOnRestRequest extension

Executes the request and directly returns the decoded payload. Throws on failure.
sendResponse<Raw>() → Future<KResponse<Raw, TDecoded>>

Available on KRestRequest<TDecoded>, provided by the ExtOnRestRequest extension

Executes the request, throwing an exception on failure.
sendResult() → Future<ApiResult<TDecoded?>>

Available on KRestRequest<TDecoded>, provided by the ExtOnRestRequest extension

Executes the request and returns an ApiResult. Throws on failure.
toString() → String
A string representation of this object.
inherited

Operators

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