HttpRepository class abstract

Repository that has methods to call HTTP APIs

Constructors

HttpRepository(String basePath)
Construct a new HttpRepository instance with baseUrl string

Properties

basePath String
getter/setter pair
baseUrl String
BaseURL of current repository All API methods with uses it as prefix of API URL
getter/setter pair
contentType ContentType
Get default content type configuration of this repository
getter/setter pair
dio ↔ Dio
latefinal
hashCode int
The hash code for this object.
no setterinherited
interceptorsWrapper ↔ InterceptorsWrapper
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
serverStream Stream<String>?
no setter
serverSubscription StreamSubscription<String>?
getter/setter pair
useInterceptor bool
no setter

Methods

delete(String path, {Object? data, Map<String, dynamic>? queryParameters, Options? options, CancelToken? cancelToken, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response>
Wrap DELETE method from Dio
get(String url, {Object? data, Map<String, dynamic>? queryParameters, Options? options, CancelToken? cancelToken, ProgressCallback? onReceiveProgress}) Future<Response>
Wrap GET method from Dio
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
patch(String path, {Object? data, Map<String, dynamic>? queryParameters, Options? options, CancelToken? cancelToken, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response>
Wrap PATCH method from Dio
post(String url, {dynamic data, Map<String, dynamic>? queryParameters, Options? options, CancelToken? cancelToken, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response>
Wrap POST method from Dio
put(String path, {Object? data, Map<String, dynamic>? queryParameters, Options? options, CancelToken? cancelToken, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response>
Wrap PUT method from Dio
setInterceptors(InterceptorsWrapper interceptorsWrapper) → dynamic
toString() String
A string representation of this object.
inherited
url(String path) String

Operators

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