https class

Static HTTP methods for easy access

Constructors

https()

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

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

Static Methods

addInterceptor(Interceptor interceptor) → void
Adds an interceptor to the client.
createTempFile(String name, [String content = '']) Future<String>
Creates a temporary file with the specified name and content. The file will be stored in the system's temporary directory with proper permissions.
deleteAllDownloadedFiles() Future<int>
Deletes all downloaded files.
deleteAllTempFiles() Future<int>
Deletes all temporary files created by this package.
deleteDownloadedFile(String fileName) Future<bool>
Deletes a downloaded file with the specified fileName.
deleteRequest(Object url, {Map<String, String>? headers}) Future<Response>
Makes a DELETE request to the specified url. The url can be either a String or a Uri object.
deleteTempFile(String name) Future<bool>
Deletes a temporary file with the specified name.
download(Object url, String fileName, {Map<String, String>? headers, void onProgress(int bytesReceived, int totalBytes)?}) Future<String>
Downloads a file from the specified url to a temporary location. The url can be either a String or a Uri object.
get(Object url, {Map<String, String>? headers}) Future<Response>
Makes a GET request to the specified url. The url can be either a String or a Uri object.
getDownloadedFile(String fileName) String?
Gets the path of a downloaded file with the specified fileName.
getTempFilePath(String name) String?
Gets the path of a temporary file with the specified name.
listDownloadedFiles() Map<String, String>
Lists all downloaded files.
listTempFiles() Map<String, String>
Lists all temporary files created by this package.
patch(Object url, {Map<String, String>? headers, Object? body, Encoding? encoding}) Future<Response>
Makes a PATCH request to the specified url. The url can be either a String or a Uri object.
post(Object url, {Map<String, String>? headers, Object? body, Encoding? encoding}) Future<Response>
Makes a POST request to the specified url. The url can be either a String or a Uri object.
put(Object url, {Map<String, String>? headers, Object? body, Encoding? encoding}) Future<Response>
Makes a PUT request to the specified url. The url can be either a String or a Uri object.
removeInterceptor(Interceptor interceptor) → void
Removes an interceptor from the client.