KRestRequest<TDecoded> class
Constructors
-
KRestRequest(KRestApi _api, {required String path, bool usePrimary = true, Map<
String, String> ? headers, Object? data, Options? options, Map<String, dynamic> ? queryParams, CancelToken? cancelToken, void onReceiveProgress(int, int)?, TDecoded decoder(dynamic data, Response _)?, LogOptions? logOptions, bool useBaseUrl = true}) - Shared request configuration used by every request wrapper in this file.
Properties
- cancelToken → CancelToken?
-
final
- data → Object?
-
final
- decoder → TDecoded Function(dynamic data, Response _)?
-
Converts the raw Dio response payload into the client-facing output type.
data ==
Response.datafinal - hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
→ Map<
String, String> ? -
final
- logOptions → LogOptions?
-
final
- onReceiveProgress → void Function(int, int)?
-
final
- options → Options?
-
final
- path → String
-
final
-
queryParams
→ Map<
String, dynamic> ? -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- transformedPath → String
-
no setter
- 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
baseUrlconfigured, in which case the path is used as-is regardless of this flag.final - usePrimary → bool
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDeleteRequest(
) → KDeleteRequest< TDecoded> -
toDownloadRequest(
{required dynamic savePath}) → KDownloadRequest< TDecoded> -
toGetRequest(
) → KGetRequest< TDecoded> -
toPathRequest(
) → KPatchRequest< TDecoded> -
toPostRequest(
) → KPostRequest< TDecoded> -
toPutRequest(
) → KPutRequest< TDecoded> -
toRequest(
) → KRequest< TDecoded> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited