AppHttpClient class Null safety
A custom Dio HTTP client implementation.
Constructors
-
AppHttpClient({BaseOptions? options, List<
Interceptor> interceptors = const []}) - Creates HTTP client.
Properties
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- httpClientAdapter ↔ HttpClientAdapter
-
read / write, inherited
- interceptors → Interceptors
-
read-only, inherited
- options ↔ BaseOptions
-
Default Request config. More see BaseOptions.
read / write, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
- transformer ↔ Transformer
-
transformer allows changes to the request/response data before it is sent/received to/from the server
This is only applicable for request methods 'PUT', 'POST', and 'PATCH'.
read / write, inherited
Methods
-
clear(
) → void -
Clear the current Dio instance waiting queue.
@Deprecated('Will delete in v5.0. Use `QueuedInterceptor` instead, more detail see' ' https://github.com/flutterchina/dio/issues/1308'), inherited
-
close(
{bool force = false}) → void -
Shuts down the dio client. [...]
inherited
-
delete<
T> (String path, {dynamic data, Map< String, dynamic> ? queryParameters, Options? options, CancelToken? cancelToken}) → Future<Response< T> > -
Handy method to make http DELETE request, which is a alias of
BaseDio.requestOptions
.inherited -
deleteUri<
T> (Uri uri, {dynamic data, Options? options, CancelToken? cancelToken}) → Future< Response< T> > -
Handy method to make http DELETE request, which is a alias of
BaseDio.requestOptions
.inherited -
download(
String urlPath, dynamic savePath, {ProgressCallback? onReceiveProgress, Map< String, dynamic> ? queryParameters, CancelToken? cancelToken, bool deleteOnError = true, String lengthHeader = Headers.contentLengthHeader, dynamic data, Options? options}) → Future<Response> -
Download the file and save it in local. The default http method is 'GET',
you can custom it by Options.method. [...]
inherited
-
downloadUri(
Uri uri, dynamic savePath, {ProgressCallback? onReceiveProgress, CancelToken? cancelToken, bool deleteOnError = true, String lengthHeader = Headers.contentLengthHeader, dynamic data, Options? options}) → Future< Response> -
Download the file and save it in local. The default http method is 'GET',
you can custom it by Options.method. [...]
inherited
-
fetch<
T> (RequestOptions requestOptions) → Future< Response< T> > -
inherited
-
get<
T> (String path, {Map< String, dynamic> ? queryParameters, Options? options, CancelToken? cancelToken, ProgressCallback? onReceiveProgress}) → Future<Response< T> > -
Handy method to make http GET request, which is a alias of
BaseDio.requestOptions
.inherited -
getUri<
T> (Uri uri, {Options? options, CancelToken? cancelToken, ProgressCallback? onReceiveProgress}) → Future< Response< T> > -
Handy method to make http GET request, which is a alias of
BaseDio.requestOptions
.inherited -
head<
T> (String path, {dynamic data, Map< String, dynamic> ? queryParameters, Options? options, CancelToken? cancelToken}) → Future<Response< T> > -
Handy method to make http HEAD request, which is a alias of
BaseDio.requestOptions
.inherited -
headUri<
T> (Uri uri, {dynamic data, Options? options, CancelToken? cancelToken}) → Future< Response< T> > -
Handy method to make http HEAD request, which is a alias of
BaseDio.requestOptions
.inherited -
lock(
) → void -
Lock the current Dio instance. [...]
@Deprecated('Will delete in v5.0. Use `QueuedInterceptor` instead, more detail see' ' https://github.com/flutterchina/dio/issues/1308'), inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
patch<
T> (String path, {dynamic data, Map< String, dynamic> ? queryParameters, Options? options, CancelToken? cancelToken, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) → Future<Response< T> > -
Handy method to make http PATCH request, which is a alias of
BaseDio.requestOptions
.inherited -
patchUri<
T> (Uri uri, {dynamic data, Options? options, CancelToken? cancelToken, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) → Future< Response< T> > -
Handy method to make http PATCH request, which is a alias of
BaseDio.requestOptions
.inherited -
post<
T> (String path, {dynamic data, Map< String, dynamic> ? queryParameters, Options? options, CancelToken? cancelToken, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) → Future<Response< T> > -
Handy method to make http POST request, which is a alias of
BaseDio.requestOptions
.inherited -
postUri<
T> (Uri uri, {dynamic data, Options? options, CancelToken? cancelToken, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) → Future< Response< T> > -
Handy method to make http POST request, which is a alias of
BaseDio.requestOptions
.inherited -
put<
T> (String path, {dynamic data, Map< String, dynamic> ? queryParameters, Options? options, CancelToken? cancelToken, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) → Future<Response< T> > -
Handy method to make http PUT request, which is a alias of
BaseDio.requestOptions
.inherited -
putUri<
T> (Uri uri, {dynamic data, Options? options, CancelToken? cancelToken, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) → Future< Response< T> > -
Handy method to make http PUT request, which is a alias of
BaseDio.requestOptions
.inherited -
request<
T> (String path, {dynamic data, Map< String, dynamic> ? queryParameters, CancelToken? cancelToken, Options? options, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) → Future<Response< T> > -
Make http request with options. [...]
inherited
-
requestUri<
T> (Uri uri, {dynamic data, CancelToken? cancelToken, Options? options, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) → Future< Response< T> > -
Make http request with options. [...]
inherited
-
toString(
) → String -
A string representation of this object. [...]
inherited
-
unlock(
) → void -
Unlock the current Dio instance. [...]
@Deprecated('Will delete in v5.0. Use `QueuedInterceptor` instead, more detail see' ' https://github.com/flutterchina/dio/issues/1308'), inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator. [...]
inherited