ApiClient class
Provides HTTP API methods, with response deserialization.
This client is built to resemble Node's Axios package (https://github.com/axios/axios) by:
- throwing exceptions if response status codes fall outside of the 2xx range
- automatically encoding request bodies as JSON
Constructors
Properties
Methods
-
close(
) → void - Closes the API client.
-
delete<
ResponseType> (String path, {Map< String, String> ? query, Map<String, String> ? headers, JsonDeserializer<ResponseType> ? responseDeserializer}) → Future<ResponseType?> - Performs an HTTP DELETE api call.
-
get<
ResponseType> (String path, {Map< String, String> ? query, Map<String, String> ? headers, JsonDeserializer<ResponseType> ? responseDeserializer}) → Future<ResponseType> - Performs an HTTP GET api call.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
post<
ResponseType> (String path, {Map< String, String?> ? query, dynamic jsonBody, Map<String, String> ? headers, JsonDeserializer<ResponseType> ? responseDeserializer}) → Future<ResponseType> - Performs an HTTP POST api call.
-
postMultipart<
ResponseType> (String path, {required Iterable< MultipartFile> files, Map<String, String> ? headers, JsonDeserializer<ResponseType> ? responseDeserializer, UploadProgressCallback? onUploadProgress}) → Future<ResponseType> - Performs an HTTP POST multipart api call.
-
put<
ResponseType> (String path, {Map< String, String?> ? query, dynamic jsonBody, Map<String, String> ? headers, JsonDeserializer<ResponseType> ? responseDeserializer}) → Future<ResponseType> - Performs an HTTP PUT api call.
-
request<
ResponseType> (String method, String path, {Map< String, String?> ? query, dynamic jsonBody, Map<String, String> ? headers, JsonDeserializer<ResponseType> ? responseDeserializer}) → Future<ResponseType> - Performs an HTTP request of the specified method.
-
send<
ResponseType> (BaseRequest request, {Map< String, String> ? headers, JsonDeserializer<ResponseType> ? responseDeserializer}) → Future<ResponseType> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited