remote/index library
Classes
- ApiInterceptor
- Api interceptor interface.
- ApiMethods
- Http methods
- ApiProvider
- The transport seam.
-
ApiRequest<
ResponseType, InnerType> -
ApiResponse<
BodyType, InnerType> - CancellationToken
- Cancels one or more in-flight requests.
- ErrorDescription
- Where an error payload sits inside a failed response body.
- FileFormField
- class for handling file upload
- HeaderInterceptor
- an interceptor to add headers to a request before initiating it
- HttpApiProvider
-
JsonInterceptor<
ErrorType> - Decodes response bodies into typed models using a registry of factories.
- LoggingInterceptor
-
Logs each request and its outcome through
ApiConfig().logger. - RemoteRepository
- for Remote Repository
- RequestOptions
- Per-call knobs that are not part of the request's description.
- RetryPolicy
- Controls automatic re-attempts of a failed request.
Typedefs
- ProgressCallback = void Function(int transferred, int total)
-
Reports transfer progress.
totalis -1 when the length is unknown. - RetryPredicate = bool Function(ApiResponse response, int attempt)
- Decides whether a failed response is worth another attempt.
Exceptions / Errors
- RequestCancelledException
- Thrown into a request's future when its CancellationToken is cancelled.