gits_http library

Classes

AsyncOrCacheStrategy
AuthTokenOption
AuthTokenOption handle token authorization
CacheException
An exception caused by an error no found data in cache.
CacheFailure
A failure caused by an error no found data in cache.
CacheOrAsyncStrategy
CacheStorage
CacheStrategy
CacheWrapper
ClientException
An exception caused by an error status code 400-499.
ClientFailure
A failure caused by a http error status code 400-499.
Either<L, R>
Interface for Either data value in Left or Right
GitsException
The interface for Gits HTTP Exception.
GitsFailure
The interface for Gits Failure after catch GitsException.
GitsHttp
The base class for an HTTP client.
GitsHttpOverrides
Override http client for bad certificate callback force to true
GitsInspector
InternalException
An exception caused by an error in internal app.
InternalFailure
A failure caused by an error in internal app.
JustAsyncStrategy
JustCacheStrategy
Left<L, R>
Class value Either if in Left
MiddlewareResponseOption
NoInternetException
An exception caused by an error no internet connection.
NoInternetFailure
A failure caused by an error no internet connection.
RedirectionException
An exception caused by an error status code 300-399.
RedirectionFailure
A failure caused by a http error status code 300-399.
RefreshTokenException
An exception caused by an error status code 300-599 in do refresh token.
RefreshTokenFailure
A failure caused by a http error status code 300-599 in do refresh token.
RefreshTokenOption
RefreshTokenOption handle refresh token authorization
Response
An HTTP response where the entire response body is known in advance.
Class value Either if in Right
ServerException
An exception caused by an error status code 500-599.
ServerFailure
A failure caused by a http error status code 500-599.
Storage
StreamUseCase<Success, Body>
The interface for stream use case
TimeoutException
An exception caused by an error timeout fetch http client.
TimeoutFailure
A failure caused by a http error timeout fetch http client.
UnauthorizedException
An exception caused by an error status code 401.
UnauthorizedFailure
A failure caused by a http error status code 401.
UseCase<Success, Body>
The interface for future use case

Enums

RefreshTokenMethod
Enum for method http call refresh token

Extensions

AuthTokenOptionExtension on AuthTokenOption
Extension for handling advantage AuthTokenOption

Typedefs

AuthCondition = bool Function(BaseRequest request, Response response)
Auth token condition return bool from condition BaseRequest or Response
ClearCondition = bool Function(BaseRequest request, Response response)
Clear token condition return bool from condition BaseRequest or Response
ConditionMiddlewareResponse = bool Function(BaseRequest request, Response response)
Middleware response condition return bool from condition BaseRequest or Response
ConditionRequireRefreshToken = bool Function(BaseRequest request, Response response)
Refresh token condition return bool from condition BaseRequest or Response
GetBody = Future<Map<String, String>?> Function()
Function async for get body http call
GetHeaders = Future<Map<String, String>?> Function()
Function async for get headers http call
GetToken = Future<String?> Function()
Function async for get token can take from local data or static token
OnAuthTokenResponse = Future<void> Function(Response response)
Callback auth token response trigger condition from authCondition
OnClearToken = Future<void> Function()
Callback clear token response trigger condition from clearCondition
OnMiddlewareResponse = Future<void> Function(Response response)
Callback middleware response trigger condition from condition
RefreshTokenResponse = Future<void> Function(Response response)
Callback refresh token response trigger condition from condition