NetworkService class abstract
Base class for all network services.
Constructors
Properties
- errorLevel → Level
-
The level to log error messages at.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- level → Level
-
The level to log messages at.
no setterinherited
- name → String
-
The name of the service.
no setteroverride
- namespace → String
-
The namespace to log messages under.
e.g. 'Service.Auth'
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addInterceptor(
Interceptor interceptor) → void - Adds an interceptor to the network service.
-
delete(
String url, {Map< String, String> ? headers, Map<String, String> ? queryParameters}) → Future<HttpResponse> -
Sends a DELETE request to the specified
url
and optionalheaders
andqueryParameters
. -
dispose(
) → void -
Disposes controllers, streams, etc.
inherited
-
get(
String url, {Map< String, String> ? headers, Map<String, String> ? queryParameters}) → Future<HttpResponse> -
Sends a GET request to the specified
url
and optionalheaders
andqueryParameters
. -
log(
Object message, [Object? error, StackTrace? stackTrace]) → void -
Logs a message with an optional error and stack trace.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
patch(
String url, Object body, {Map< String, String> ? headers, Map<String, String> ? queryParameters}) → Future<HttpResponse> -
Sends a PATCH request to the specified
url
with the specifiedbody
and optionalheaders
andqueryParameters
. -
post(
String url, Object body, {Map< String, String> ? headers, Map<String, String> ? queryParameters}) → Future<HttpResponse> -
Sends a POST request to the specified
url
with the specifiedbody
and optionalheaders
andqueryParameters
. -
put(
String url, Object body, {Map< String, String> ? headers, Map<String, String> ? queryParameters}) → Future<HttpResponse> -
Sends a PUT request to the specified
url
with the specifiedbody
and optionalheaders
andqueryParameters
. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited