Client class

Client handles all the HTTP calls. Add Request to Client and await for Response. Call init before use and dispose after use.

Constructors

Client({bool verbose = false, bool verifySSL = true, String? userAgent, String? cookiePath, List<HTTPVersion> httpVersions = const [HTTPVersion.http1, HTTPVersion.http11, HTTPVersion.http2], String? libPath, List<HTTPInterceptor> interceptors = const [], Duration timeout = Duration.zero, Duration connectTimeout = const Duration(seconds: 300), String? altSvcCache})

Properties

altSvcCache String?
final
connectTimeout Duration
final
cookiePath String?
final
hashCode int
The hash code for this object.
no setterinherited
httpVersions List<HTTPVersion>
final
interceptors List<HTTPInterceptor>
final
libPath String?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timeout Duration
final
userAgent String?
final
verbose bool
final
verifySSL bool
final

Methods

dispose() → void
download({required Request request, required String path}) Future<Response>
init() Future<void>
logsFor(Request request) Stream<LogInfo>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
send(Request req) Future<Response>
toString() String
A string representation of this object.
inherited

Operators

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