DefaultHttpAdapter class

Default adapter built on package:http.

By default each request gets a private http.Client, so cancelling a request can close that owned client without affecting unrelated requests. If you inject a shared client, cancellation still surfaces as CancelError to the caller, but this adapter will not close the shared client on behalf of one request.

Implemented types

Constructors

DefaultHttpAdapter({Client clientFactory()?, Client? client})

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() → void
Releases any persistent resources.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
send(AdapterRequest request) → Future<AdapterResponse>
Sends request and returns the fully buffered response.
override
sendStreaming(AdapterRequest request) → Future<AdapterResponse>
Sends request and returns a response whose body is delivered incrementally via AdapterResponse.bodyStream.
override
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited