HttpClientAdapter class abstract

HttpAdapter is a bridge between Dio and HttpClient.

Dio implements standard and friendly API for developer. HttpClient is the real object that makes Http requests.

We can use any HttpClients not just "dart:io:HttpClient" to make the HTTP request. All we need is to provide a HttpClientAdapter.

If you want to customize the HttpClientAdapter you should instead use either IOHttpClientAdapter on dart:io platforms or BrowserHttpClientAdapter on dart:html platforms.

dio.httpClientAdapter = HttpClientAdapter();
Implementers

Constructors

HttpClientAdapter()
factory

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<void>? 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