Uno class Null safety

This is a Http Client inspired by AxiosJS.

Constructors

Uno({String baseURL = '', Map<String, String> headers = const {}, Duration timeout = const Duration(seconds: 30)})
Creating an instance of Uno with new global options
factory

Properties

baseURL String
baseURL will be prepended to url unless url is absolute. It can be convenient to set baseURL for an instance of uno to pass relative URLs to methods of that instance.
read-only
context → InjectContext
@visibleForTesting, read-only
hashCode int
The hash code for this object.
read-only, inherited
headers Map<String, String>
Default headers for all requests.
read-only
interceptors → Interceptors
Create or remove interceptors for Request and Response.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
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.
read-only

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.
Aliase to GET method.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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