ApiClient class

HTTP API client with auth, interceptors, and configurable storage.

Use ApiClientConfig to configure base URL, token retrieval, and options.

Implemented types

Constructors

ApiClient(ApiClientConfig config)
Creates an ApiClient with the given config.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

delete(String endpoint, {bool includeToken = true, RequestOptions? options}) Future<CustomApiResponse>
Sends a DELETE request to endpoint.
override
get(String endpoint, {bool includeToken = true, RequestOptions? options}) Future<CustomApiResponse>
Sends a GET request to endpoint.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
patch(String endpoint, dynamic data, {bool includeToken = true, bool isMultipart = false, RequestOptions? options}) Future<CustomApiResponse>
Sends a PATCH request to endpoint with data.
override
post(String endpoint, dynamic data, {bool includeToken = true, bool isMultipart = false, RequestOptions? options}) Future<CustomApiResponse>
Sends a POST request to endpoint with data.
override
put(String endpoint, dynamic data, {bool includeToken = true, bool isMultipart = false, RequestOptions? options}) Future<CustomApiResponse>
Sends a PUT request to endpoint with data.
override
toString() String
A string representation of this object.
inherited

Operators

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