Releases: request-dl/request-dl-nio
RequestDL 2.2.0
RequestDL 2.1.4
RequestDL 2.1.3
RequestDL 2.1.2
RequestDL 2.1.1
RequestDL 2.1.0
What’s Changed
We are excited to announce the following new features and improvements in our latest release
🚀 Enhancements
- Added support for passwords as
NIOSSLSecureBytesto define aPrivateKeyfor enhanced security (#60) - Introducing
@Namespace, which allows developers to define a unique ID for dynamic memory regions ofProperty(#65) @StoredObjectis now available to store classes within aProperty. We have also implementedSSLKeyLoggerandSSLPSKIdentityResolverfor use with@StoredObject(#62) (#63)- Introducing
RequestActor, which allows developers to define a common actor for the construction ofPropertyandTaskto isolate them from the rest of the application (#67)
🐛 Bug Fixes
- Deprecated incomplete support for server-side configurations to improve code stability (#71)
- Internal improvements to cache instantiated
HTTPClients for improved performance (#78)
We hope these new features and improvements will enhance your experience with our product. Please leave a comment in discuss section if you have any questions or feedback.
RequestDL 2.0.3
RequestDL 2.0.2
RequestDL 2.0.1
RequestDL 2.0.0
We are thrilled to announce version 2.0 of RequestDL, which includes a range of new features and a much more consistent API, thanks to the Async HTTP Client. New additions have been implemented, including new modifiers, redesigned tasks, and new properties that will greatly facilitate software development.
Property
SecureConnection
SecureConnection handles all the settings for the TLS security protocol. With it, you can specify the type of certificate verification, send client certificates to the server, and set the minimum and maximum supported version for the application (TLS 1.0, TLS 1.1, ...).
Related to TLS, the following are now available: Certificate, Certificates, PrivateKey, Trusts, AdditionalTrusts, and PSKIdentity.
ReadingMode
During the receipt of the server's response, it is possible to read based on chunks of defined size or given a sequence of bytes. You can take advantage of this implementation when using both UploadTask and DownloadTask to receive the response similar to AsyncBytes from URLSession.
Session
The Session has been redesigned to support AsyncHTTPClient, considering the methods and properties that can be used.
Note
The current implementation allows specification of the server context. However, you should not use it. It was implemented following the Swift NIO implementation and the lack of limitations by the Async HTTP Client. Using it will not result in anything.
Task
UploadTask
The UploadTask allows the use of two implemented methods as modifiers. You can monitor both upload and download progress using a class of type UploadProgress (if you are only monitoring upload), DownloadProgress (for only download), and Progress (to monitor both stages). In the end, you get the TaskResult<Data>.
However, you can also implement exclusive modifiers to download a file and save it directly to disk thanks to the implementation of AsyncBytes in conjunction with ReadingMode.
Thanks to the ReadingMode(separator: String) function, it is possible to even download line by line and save them directly to a local database.
let result = try await UploadTask { … }
.uploadProgress(uploadMonitor)
.downloadProgress(downloadMonitor)
.result() // -> TaskResult<Data>Or:
let result = try await UploadTask { … }
.progress(progressMonitor) // UploadProgress & DownloadProgress
.result() // -> TaskResult<Data>DownloadTask
The DownloadTask allows the use of modifiers that are implemented exclusively for AsyncBytes. With it, you can skip the upload stage and focus only on the download stage.
With this, you can use the downloadProgress(_:) method or implement an exclusive method to save the received bytes directly to disk.
let result = try await DownloadTask { … }
.downloadProgress(downloadMonitor)
.result() // -> TaskResult<Data>Modifiers
IgnoresProgress
Methods ignoresProgress(), ignoresUploadProgress(), and ignoresDownloadProgress() are now available to skip the upload and download stages of the request.
Progress
Methods progress(_:), uploadProgress(_:), downloadProgress(_:), and downloadProgress(_:length:) are now available to skip the upload and download stages of the request.
Next Steps
We know that the implementation of RequestDL does not cover all possible networking layer features, and we invite you and the community to actively contribute to the development of new features.
Some planned features include the redesign of Payload and Form to use the methods of FileBuffer and DataBuffer implemented internally. We are also open to discussing the implementation of Cookies and Cache directly in RequestDL.
Another interesting feature is the implementation of Socket and improvements in Session to cover even more use cases.
Acknowledgements
Thank you to Mike Lewis for his valuable contribution about transitioning to Async HTTP Client. We also appreciate the continuous support and engagement from the open-source community in providing feedback, reporting issues, and suggesting new features.
We hope that the new features and improvements in RequestDL 2.0 will further enhance your experience in developing networked applications in Swift. We are committed to continually improving and expanding the capabilities of RequestDL, and we encourage you to provide feedback, report issues, and contribute to the project on our GitHub repository.
To get started with RequestDL 2.0, please refer to the updated documentation and examples available on it. We also have a dedicated support forum where you can ask questions, share ideas, and connect with other RequestDL users.
Thank you for your continued support, and we look forward to seeing what you build with RequestDL 2.0!