Uno class abstract
This is a Http Client inspired by AxiosJS.
Constructors
Properties
- baseURL → String
-
baseURL
will be prepended tourl
unlessurl
is absolute. It can be convenient to setbaseURL
for an instance of uno to pass relative URLs to methods of that instance.no setter - context → InjectContext
-
The get context it's the type
InjectContext
no setter - hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
→ Map<
String, String> -
Default headers for all requests.
no setter
- interceptors → Interceptors
-
Create or remove interceptors for Request and Response.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- timeout → Duration
-
Default request timeout
Time that the server will wait for the response to the request.
The connection will be interrupted if you hear timeout.
no setter
Methods
-
call(
{required String url, Duration? timeout, String method = 'get', Map< String, String> params = const {}, Map<String, String> headers = const {}, ResponseType responseType = ResponseType.json, DownloadCallback? onDownloadProgress, ValidateCallback? validateStatus, dynamic data}) → Future<Response> - Creates request with uno API:
-
delete(
String url, {Duration? timeout, Map< String, String> params = const {}, Map<String, String> headers = const {}, ResponseType responseType = ResponseType.json, DownloadCallback? onDownloadProgress, ValidateCallback? validateStatus, dynamic data}) → Future<Response> -
Aliase to
GET
method. -
get(
String url, {Duration? timeout, Map< String, String> params = const {}, Map<String, String> headers = const {}, ResponseType responseType = ResponseType.json, DownloadCallback? onDownloadProgress, ValidateCallback? validateStatus}) → Future<Response> -
Aliase to
GET
method. -
head(
String url, {Duration? timeout, Map< String, String> params = const {}, Map<String, String> headers = const {}, ResponseType responseType = ResponseType.json, DownloadCallback? onDownloadProgress, ValidateCallback? validateStatus}) → Future<Response> -
Aliase to
GET
method. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
patch(
String url, {Duration? timeout, Map< String, String> params = const {}, Map<String, String> headers = const {}, ResponseType responseType = ResponseType.json, DownloadCallback? onDownloadProgress, ValidateCallback? validateStatus, dynamic data}) → Future<Response> -
Aliase to
GET
method. -
post(
String url, {Duration? timeout, Map< String, String> params = const {}, Map<String, String> headers = const {}, ResponseType responseType = ResponseType.json, DownloadCallback? onDownloadProgress, ValidateCallback? validateStatus, dynamic data}) → Future<Response> -
Aliase to
GET
method. -
put(
String url, {Duration? timeout, Map< String, String> params = const {}, Map<String, String> headers = const {}, ResponseType responseType = ResponseType.json, DownloadCallback? onDownloadProgress, ValidateCallback? validateStatus, dynamic data}) → Future<Response> -
Aliase to
GET
method. -
request(
Request request) → FutureOr< Response> - Send a complete Request object.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited