network library
Classes
- AuthInterceptor
-
Interceptor que agrega automáticamente el header
Authorizationcon un token Bearer obtenido de forma asíncrona. - CancelToken
-
Controls cancellation of
Dio's requests. - ErrorInterceptor
- Interceptor que transforma errores de Dio en GpExceptions con mensajes amigables para mostrarlos directamente en la UI.
- ErrorInterceptorHandler
- The handler for interceptors to handle error occurred during the request.
-
GpApiResponse<
T> - Resultado estándar de una petición
- GpHttpClient
- GpHttpConfig
- GpHttpHelpers
- GpRetryOptions
- GpService
- Abstracción base para servicios
- 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.
- Options
-
The configuration for a single request.
BaseOptionsand Options will be merged into one RequestOptions before sending the requests. See Options.compose. - RequestInterceptorHandler
- The handler for interceptors to handle before the request has been sent.
- 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.
- ResponseInterceptorHandler
- The handler for interceptors to handle after respond.
- RetryInterceptor
- Reintentos simples para fallos temporales o códigos HTTP configurables.
- TokenRefreshInterceptor
- Refresca token ante 401/403 y reintenta la solicitud una sola vez.
Enums
- DioExceptionType
- The exception enumeration indicates what type of exception has happened during requests.
Typedefs
- GpErrorMapper = Object Function(DioException error)
Exceptions / Errors
- DioException
- DioException describes the exception info when a request failed.
- GpException
- NetworkException
- TimeoutException