SmartApiClient class
Main API client for making HTTP requests
Constructors
- SmartApiClient({required ApiClientConfig config})
- Creates a SmartApiClient with the given configuration
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
-
addRequestInterceptor(
RequestInterceptor interceptor) → void - Adds a request interceptor
-
addResponseInterceptor(
ResponseInterceptor interceptor) → void - Adds a response interceptor
-
cancelRequest(
String cancelToken) → void - Cancels a request with the given token
-
close(
) → void - Closes the client and cleans up resources
-
delete(
String endpoint, {dynamic body, Map< String, String> ? headers, Map<String, dynamic> ? queryParameters, Duration? timeout, String? cancelToken}) → Future - Performs a DELETE request
-
get(
String endpoint, {Map< String, String> ? headers, Map<String, dynamic> ? queryParameters, Duration? timeout, String? cancelToken}) → Future - Performs a GET request
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
patch(
String endpoint, {dynamic body, Map< String, String> ? headers, Map<String, dynamic> ? queryParameters, Duration? timeout, String? cancelToken}) → Future - Performs a PATCH request
-
post(
String endpoint, {dynamic body, Map< String, String> ? headers, Map<String, dynamic> ? queryParameters, Duration? timeout, String? cancelToken}) → Future - Performs a POST request
-
put(
String endpoint, {dynamic body, Map< String, String> ? headers, Map<String, dynamic> ? queryParameters, Duration? timeout, String? cancelToken}) → Future - Performs a PUT request
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited