HttpRequestDS class

Data source for making http requests

Constructors

HttpRequestDS(Client _client)
create new instance of HttpRequestDS

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

delete({required Uri url, required dynamic headers}) Future<Response>
get({required Uri url, dynamic headers}) Future<Response>
getStream({required Uri url, Map<String, String>? headers}) Stream<List<int>>
Get data as a stream to avoid loading entire file into memory Returns a stream of bytes that can be written directly to a file
jsonRequest(String url) Future<Map<String, dynamic>>
make a get request to the given url
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
post({required Uri url, required Uint8List body, required dynamic headers}) Future<Response>
put({required Uri url, required Object body, required dynamic headers}) Future<Response>
putStream({required Uri url, required Stream<List<int>> body, required Map<String, String> headers, int? contentLength}) Stream<UploadProgress>
Upload data using streaming to avoid loading entire file into memory Returns a stream of UploadProgress that emits progress updates and completes when upload is done Uses BehaviorSubject so new listeners get the latest progress immediately
toString() String
A string representation of this object.
inherited

Operators

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