BaseAPI class abstract

Constructors

BaseAPI.new({required String baseUrl, Map<String, dynamic>? parameters, Map<String, dynamic>? headers, Duration? connectTimeout, Duration? receiveTimeout, Duration? sendTimeout, int? maxRedirects, List<Interceptor> interceptors = const []})

Properties

baseUrl String
no getter
hashCode int
The hash code for this object.
no setterinherited
httpClientAdapter IOHttpClientAdapter
no getter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addInterceptors(List<Interceptor> interceptors) → void
clearInterceptors() → void
delete(String path, {RequestModel? request, CancelToken? cancelToken}) Future<Response>
download(String path, {required String savePath, Options? options, RequestModel? request, String method = 'GET', CancelToken? cancelToken, bool deleteOnError = true, ProgressCallback? onReceiveProgress, String lengthHeader = Headers.contentLengthHeader}) Future<Response>
get(String path, {RequestModel? request, CancelToken? cancelToken}) Future<Response>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
post(String path, {RequestModel? request, CancelToken? cancelToken}) Future<Response>
put(String path, {RequestModel? request, CancelToken? cancelToken}) Future<Response>
removeInterceptors(List<Interceptor> interceptors) → void
toString() String
A string representation of this object.
inherited

Operators

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