netguard library
Classes
- AdvanceAuthCallbacks
- Simple implementation of AuthCallbacks for basic use cases with enhanced auto-refresh support
- AuthCallbacks
- Authentication callbacks interface
- AuthConfig
- Configuration for authentication behavior
- AuthInterceptor
- Authentication interceptor for NetGuard with improved queue management and refresh token cooldown
- AuthManager
- Authentication manager for NetGuard
- CacheManager
- Universal cache manager that works across all platforms
- CancelToken
-
Controls cancellation of
Dio's requests. - FormData
- A class to create readable "multipart/form-data" streams. It can be used to submit forms and file uploads to http server.
- Headers
- The headers class for requests and responses.
- HttpClientAdapter
-
HttpAdapteris a bridge betweenDioand HttpClient. - Interceptor
- Interceptor helps to deal with RequestOptions, Response, and DioException during the lifecycle of a request before it reaches users.
- InterceptorsWrapper
- A helper class to create interceptors in ease.
- IOHttpClientAdapter
- The default HttpClientAdapter for native platforms.
- MultipartFile
-
An upload content that is a part of
MultipartRequest. This doesn't need to correspond to a physical file. - NetGuard
- NetGuard - A powerful HTTP client built on top of Dio
- NetGuardBase
- Base class for NetGuard that provides all Dio functionality
- NetGuardInterceptors
- NetGuard interceptors wrapper around Dio's Interceptors
- NetGuardOptions
- Options
-
The configuration for a single request.
BaseOptionsand Options will be merged into one RequestOptions before sending the requests. See Options.compose. - QueuedInterceptor
- Interceptor in queue.
- QueuedInterceptorsWrapper
- A helper class to create QueuedInterceptor in ease.
- RequestOptions
-
The internal request option class that is the eventual result after
BaseOptionsand Options are composed. -
Response<
T> - The Response class contains the payload (could be transformed) that respond from the request, and other information of the response.
- Transformer
- Transformer allows changes to the request/response data before it is sent/received to/from the server.
Enums
- DioExceptionType
- The exception enumeration indicates what type of exception has happened during requests.
- ListFormat
- Specifies the array format (a single parameter with multiple parameter or multiple parameters with the same name). and the separator for array items.
- NetworkStatus
- ResponseType
- Indicates which transformation should be applied to the response data.
Extensions
- NetGuardErrorExtension on DioException
- NetGuard error extension methods
-
NetGuardResponseExtension
on Response<
T> - NetGuard response extension methods
Typedefs
- NetGuardError = DioException
- NetGuard error wrapper (currently just re-exports Dio exceptions) This allows for future enhancements without breaking changes
- NetGuardErrorType = DioExceptionType
-
NetGuardResponse<
T> = Response< T> - NetGuard response wrapper (currently just re-exports Dio Response) This allows for future enhancements without breaking changes
- ProgressCallback = void Function(int count, int total)
- The type of a progress listening callback when sending or receiving data.
-
RequestEncoder
= FutureOr<
List< Function(String request, RequestOptions options)int> > - The type of a request encoding callback.
-
ResponseDecoder
= FutureOr<
String?> Function(List<int> responseBytes, RequestOptions options, ResponseBody responseBody) - The type of a response decoding callback.
- ValidateStatus = bool Function(int? status)
- The type of a response status code validate callback.
Exceptions / Errors
- DioException
- DioException describes the exception info when a request failed.