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.
Constructors
- HttpClientAdapter()
-
Create a HttpClientAdapter based on the current platform (IO/Web).
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 - Close the current adapter and its inner clients or requests.
-
fetch(
RequestOptions options, Stream< Uint8List> ? requestStream, Future<void> ? cancelFuture) → Future<ResponseBody> - 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