AppHttpClient class

Inheritance

Constructors

AppHttpClient([BaseOptions? options])

Properties

dio Dio
finalinherited
exceptionMapper ResponseExceptionMapper?
If provided, this function which will be invoked when a response exception occurs, allowing the response exception to be mapped to a custom exception class which extends AppHttpClientException.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
interceptors Interceptors
no setter
refreshToken String?
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addRefreshCredentialHandler(Future<void> handler()) → void
clearCredentialCache() → void
get<T>(String path, {Map<String, dynamic>? queryParameters, Options? options, CancelToken? cancelToken, ProgressCallback? onReceiveProgress}) Future<Response<T>>
HTTP GET request.
inherited
gql<T>(String method, dynamic query, {String? path, Map<String, dynamic>? variables, Options? options, CancelToken? cancelToken, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<T>>
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
post<T>(String path, {dynamic data, Map<String, dynamic>? queryParameters, Options? options, CancelToken? cancelToken, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<T>>
HTTP POST request.
inherited
refreshCredential() Future<void>
request<T>(String method, String path, {dynamic data, Map<String, dynamic>? queryParameters, Options? options, CancelToken? cancelToken, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<T>>
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

writeRefreshToken(String? token) → void

Constants

refreshTokenKey → const String