NetworkKit 0.2.0
This release adds download/upload progress tracking and flexible session management.
New Features
- Download with Progress - Download files with real-time progress tracking using
AsyncThrowingStream<RequestProgress<URL>, Error> - Upload with Progress - Upload files with progress tracking using
AsyncThrowingStream<RequestProgress<Response>, Error> - RequestProgress Enum -
.progress(Double)and.completed(T)cases for tracking transfer operations
Session Providers
- DefaultSession - Standard session for most API calls
- EphemeralSession - Private requests without caching or cookies
- BackgroundSession - Transfers that continue when app is backgrounded
- Custom SessionProvider - Protocol for creating custom session configurations
Improvements
- Custom Base URL - Override
baseURLper request for multi-endpoint APIs - Simplified Configuration -
NetworkClientConfigurationnow delegates timeout control to SessionProvider
Example App
- Added Download Demo screen with circular progress indicator
- TabView navigation between Weather and Download demos
Bug Fixes
- Fixed download progress not updating (was using upload delegate instead of bytes API)