TClient class

Available extensions

Constructors

TClient({HttpClient? client, TClientOptions? options})

Properties

hashCode int
The hash code for this object.
no setterinherited
ioClient HttpClient
final
options TClientOptions
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

buildUri(String path, Map<String, String>? query) Uri
build uri
delete(String path, {Object? data, Map<String, String>? query, Map<String, String>? headers, Duration? sendTimeout, Duration? receiveTimeout}) Future<TClientResponse>

Available on TClient, provided by the ClientRequestExtensions extension

DELETE request
download(String path, {required String savePath, Map<String, String>? query, Map<String, String>? headers, TClientToken? token, OnCancelCallback? onCancelCallback, void onError(String message)?, OnReceiveProgressCallback? onReceiveProgress, OnReceiveProgressSpeedCallback? onReceiveProgressSpeed}) Future<File>

Available on TClient, provided by the ClientFileExtensions extension

File download with progress
downloadStream(String path, {required String savePath, TClientToken? token, Map<String, String>? query, Map<String, String>? headers}) Stream<DownloadStreamProgress>

Available on TClient, provided by the ClientFileExtensions extension

File Download Stream
get(String path, {Map<String, String>? query, Map<String, String>? headers, Duration? sendTimeout, Duration? receiveTimeout}) Future<TClientResponse>

Available on TClient, provided by the ClientRequestExtensions extension

GET request
getContentLength(String url, {Duration? sendTimeout}) Future<HttpClientResponse>
Opens an HTTP connection using the HEAD method.
getResponseHeaders(HttpClientResponse response) Map<String, String>
Get All Response Headers

Available on TClient, provided by the ClientRequestExtensions extension

MethodHEAD
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
options(String path, {Map<String, String>? query, Map<String, String>? headers, Duration? sendTimeout, Duration? receiveTimeout}) Future<TClientResponse>

Available on TClient, provided by the ClientRequestExtensions extension

Methodoptions
patch(String path, {Map<String, String>? query, Map<String, String>? headers, Duration? sendTimeout, Duration? receiveTimeout}) Future<TClientResponse>

Available on TClient, provided by the ClientRequestExtensions extension

Methodpatch
post(String path, {Map<String, String>? query, Object? data, Map<String, String>? headers, Duration? sendTimeout, Duration? receiveTimeout}) Future<TClientResponse>

Available on TClient, provided by the ClientRequestExtensions extension

POST request
put(String path, {Map<String, String>? query, Object? data, Map<String, String>? headers, Duration? sendTimeout, Duration? receiveTimeout}) Future<TClientResponse>

Available on TClient, provided by the ClientRequestExtensions extension

PUT request
sendRequest(Method method, String path, {Map<String, String>? query, Object? body, Map<String, String>? headers, Duration? sendTimeout, Duration? receiveTimeout}) Future<TClientResponse>
sendRequest
setHeaders(HttpClientRequest request, Map<String, dynamic>? headers) → void
Marge Header,set All Headers
setProxy(String? proxy) → void
Set Client Proxy
streamRequest(Method method, String path, {CancelToken? cancelToken, Map<String, String>? query, Object? body, Map<String, String>? headers}) Stream<TClientResponseStream>

Available on TClient, provided by the ClientStreamRequestExtensions extension

Stream Request
toString() String
A string representation of this object.
inherited
upload(String path, {required File file, Map<String, String>? query, Map<String, String>? fields, Map<String, String>? headers, void onUploadProgress(int sent, int total)?, OnCancelCallback? onCancelCallback, void onError(String message)?, TClientToken? token}) Future<TClientResponse?>

Available on TClient, provided by the ClientFileExtensions extension

File upload with progress
uploadStream(String path, {required File file, TClientToken? token}) Stream<UploadStreamProgress>

Available on TClient, provided by the ClientFileExtensions extension

File Upload Stream

Operators

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