ApiEndpoint class abstract

An abstract class defining the structure of an API endpoint.

Implementers

Constructors

ApiEndpoint()

Properties

cacheOptions CacheOptions
The configuration defining caching options.
no setter
defaultAuthOptions EndpointAuthOptions
The default authentication options for the endpoint.
no setter
hashCode int
The hash code for this object.
no setterinherited
method String
The HTTP method for the API endpoint (e.g., 'GET', 'POST', 'PUT').
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
url String
The URL of the API endpoint.
no setter
validStatusCode int
The valid status code expected from the API response.
no setter

Methods

call<T>({EndpointAuthOptions? authOptions, Map<String, dynamic>? queryParameters, Map<String, dynamic>? pathParameters, Object? data, Map<String, dynamic>? headers, T map(dynamic responseBody)?, EndpointErrorCallback? onError, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, bool isMultipart = false, bool ignoreCache = false, bool nullIfError = true}) FutureOr<T?>
Makes an API request to the endpoint and returns the parsed response of type T.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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