NetworkClient class abstract

The pristine abstraction for standard REST API communication. It is lean, highly cohesive, and incredibly easy to mock.

Implementers

Constructors

NetworkClient()

Properties

hashCode int
The hash code for this object.
no setterinherited
interceptors List<Interceptor>
Manage interceptors (Auth, Logging, etc.)
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addInterceptor(Interceptor interceptor) → void
delete<T>(String path, {Object? body, Map<String, dynamic>? query, JsonParser<T>? parser, RequestOptions? options}) Future<Result<T>>
get<T>(String path, {Map<String, dynamic>? query, JsonParser<T>? parser, RequestOptions? options}) Future<Result<T>>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
patch<T>(String path, {Object? body, Map<String, dynamic>? query, JsonParser<T>? parser, RequestOptions? options}) Future<Result<T>>
post<T>(String path, {Object? body, Map<String, dynamic>? query, JsonParser<T>? parser, RequestOptions? options}) Future<Result<T>>
put<T>(String path, {Object? body, Map<String, dynamic>? query, JsonParser<T>? parser, RequestOptions? options}) Future<Result<T>>
request<T>(String path, {required HttpMethod method, Object? body, Map<String, dynamic>? queryParameters, JsonParser<T>? parser, RequestOptions? options}) Future<Result<T>>
Sends a generic HTTP request. Core verbs delegate to this method.
toString() String
A string representation of this object.
inherited

Operators

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