HttpClientAdapter class abstract
HttpAdapter is a bridge between Dio and HttpClient.
Dio: Implements standard and friendly API for developer.
HttpClient: It is the real object that makes Http requests.
We can use any HttpClient not just "dart:io:HttpClient" to make the Http request. All we need is providing a HttpClientAdapter.
The default HttpClientAdapter for Dio is DefaultHttpClientAdapter
.
dio.httpClientAdapter = DefaultHttpClientAdapter();
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
{bool force = false}) → void -
fetch(
RequestOptions options, Stream< Uint8List> ? requestStream, Future? cancelFuture) → Future<ResponseBody> - We should implement this method to make real http requests.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited