RestClient class abstract

Rest client utility class using Dio for making HTTP requests over Rest Endpoints.

The RestClient class provides methods to perform GET and POST requests with additional caching. It utilizes the Dio library and includes error handling for DioException. The RestClient class is mainly used by the ChainBaseApi class to make requests to the ChainBase API.

Implementers

Constructors

RestClient()

Properties

hashCode int
The hash code for this object.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

get<T>(String path, {Object? body, Map<String, dynamic>? queryParameters, Options? options}) Future<T>
Performs a GET request to the provided API URL and returns the response.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
post<T>(String path, {Object? body, Map<String, dynamic>? queryParameters, Options? options}) Future<T>
Performs a POST request to the provided API URL with the given body and returns the response.
toString() String
A string representation of this object.
inherited

Operators

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