Api class
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
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited
Static Methods
-
dataFromStorage(String path)
→ String
-
Help to get url to resource in server storage
-
delete(String path, {bool isAuth = false, bool testMode = false, Map<String, dynamic>? query, CancelToken? cancelToken, ResponseType responseType = ResponseType.map_data, bool ignoreOnAllError = false, int urlIndex = 0})
→ Future
-
Sends an HTTP DELETE request.
-
get(String path, {bool isAuth = false, bool testMode = false, Map<String, dynamic>? query, CancelToken? cancelToken, ResponseType responseType = ResponseType.map_data, dynamic onReceiveProgress(int, int)?, bool ignoreOnAllError = false, int urlIndex = 0})
→ Future
-
Sends an HTTP GET request.
-
init({required List<String> urls, bool globalTestMode = false, bool bearerToken = true, dynamic disableAllTestMode = false, bool enableUtf8Decoding = false, bool loadTokenFromMemory = true, String? authTitle, bool usePrintInLogs = false, dynamic onAllError(APIException error)?, String? storageUrl})
→ Future<void>
-
Initialization API class
-
patch(String path, {bool isAuth = false, bool testMode = false, dynamic body, Map<String, dynamic>? query, CancelToken? cancelToken, ResponseType responseType = ResponseType.map_data, dynamic onSendProgress(int, int)?, dynamic onReceiveProgress(int, int)?, bool ignoreOnAllError = false, int urlIndex = 0})
→ Future
-
Sends an HTTP PATCH request.
-
post(String path, {bool isAuth = false, bool testMode = false, dynamic body, Map<String, dynamic>? query, CancelToken? cancelToken, ResponseType responseType = ResponseType.map_data, dynamic onSendProgress(int, int)?, dynamic onReceiveProgress(int, int)?, bool ignoreOnAllError = false, int urlIndex = 0})
→ Future
-
Sends an HTTP POST request.
-
put(String path, {bool isAuth = false, bool testMode = false, dynamic body, Map<String, dynamic>? query, CancelToken? cancelToken, ResponseType responseType = ResponseType.map_data, dynamic onSendProgress(int, int)?, dynamic onReceiveProgress(int, int)?, bool ignoreOnAllError = false, int urlIndex = 0})
→ Future
-
Sends an HTTP PUT request.
-
setExpire({required int seconds})
→ void
-
Set refresh token expire in seconds. Fro check you can use Api.isRefreshTokenExpire
-
Set headers. Default is only "Content-type": application/json
-
setRefreshToken(String token)
→ void
-
Set refresh token
-
setToken(String token)
→ void
-
Set Authorization token