KPatchRequest<TDecoded> class
PATCH request wrapper with send-progress support and optional response decoding.
- Inheritance
-
- Object
- KRestRequest<
TDecoded> - KPatchRequest
Constructors
-
KPatchRequest(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)?, void onSendProgress(int, int)?, TDecoded decoder(dynamic data, Response _)?, LogOptions? logOptions, bool useBaseUrl = true, FutureOr<KPatchRequest< resolve(KPatchRequest<TDecoded> >TDecoded> )?}) -
KPatchRequest.from(KRestRequest<
TDecoded> r, {FutureOr<KPatchRequest< resolve(KPatchRequest<TDecoded> >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.datafinalinherited - hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
→ Map<
String, String> ? -
finalinherited
- logOptions → LogOptions?
-
finalinherited
- onReceiveProgress → void Function(int, int)?
-
finalinherited
- onSendProgress → void Function(int, int)?
-
final
- options → Options?
-
finalinherited
- path → String
-
finalinherited
-
queryParams
→ Map<
String, dynamic> ? -
finalinherited
-
resolve
→ FutureOr<
KPatchRequest< Function(KPatchRequest<TDecoded> >TDecoded> )? -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- 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
baseUrlconfigured, in which case the path is used as-is regardless of this flag.finalinherited - usePrimary → bool
-
finalinherited
Methods
-
copyWith(
{String? pathTransform(String)?, bool? usePrimary, Map< String, String> ? headers, Object? data, Options? options, CancelToken? cancelToken, Map<String, dynamic> ? queryParams, void onSendProgress(int, int)?, void onReceiveProgress(int, int)?, LogOptions? logOptions, bool? useBaseUrl, TDecoded decoder(dynamic data, Response _)?}) → KPatchRequest<TDecoded> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
patch(
) → Future< TDecoded?> -
patchResponse<
Raw> () → Future< KResponse< Raw, TDecoded> > -
toDeleteRequest(
) → KDeleteRequest< TDecoded> -
inherited
-
toDownloadRequest(
{required dynamic savePath}) → KDownloadRequest< TDecoded> -
inherited
-
toGetRequest(
) → KGetRequest< TDecoded> -
inherited
-
toPathRequest(
) → KPatchRequest< TDecoded> -
inherited
-
toPostRequest(
) → KPostRequest< TDecoded> -
inherited
-
toPutRequest(
) → KPutRequest< TDecoded> -
inherited
-
toRequest(
) → KRequest< TDecoded> -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
tryPatch(
) → Future< TDecoded?> -
tryPatchResponse<
Raw> () → Future< KResponse< Raw, TDecoded> >
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited