ApiClient class

The client interface for the API. Subclasses can override invokeApi to add custom behavior.

Constructors

ApiClient({Uri? baseUri, Client? client, Map<String, String> defaultHeaders = const {}, String? readSecret(String name)?})

Properties

baseUri Uri
final
client → Client
final
defaultHeaders Map<String, String>
final
hashCode int
The hash code for this object.
no setterinherited
readSecret String? Function(String name)?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

invokeApi({required Method method, required String path, Map<String, List<String>> queryParameters = const {}, Object? body, BodyContentType bodyContentType = BodyContentType.json, Map<String, String> headerParameters = const {}, AuthRequest? authRequest}) Future<Response>
invokeApiMultipart({required Method method, required String path, required Map<String, String> fields, required List<MultipartFile> files, Map<String, List<String>> queryParameters = const {}, Map<String, String> headerParameters = const {}, AuthRequest? authRequest}) Future<Response>
Send a multipart/form-data request built from fields (text parts) and files (file parts). The Content-Type header is set by MultipartRequest itself, including the generated boundary — do not pass one via headerParameters.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolveAuth(AuthRequest? authRequest) ResolvedAuth
Resolve an AuthRequest into a ResolvedAuth. Override this to add custom auth handling.
toString() String
A string representation of this object.
inherited

Operators

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