Releases: freshOS/Networking
Releases · freshOS/Networking
Release list
0.3.4
- Solves #26
- Add the ability to retry a request with a middleWare via
requestRetrier
The typical example use case is reauthenticating before retrying a request:
private var isRetrying = CurrentValueSubject<Bool, Error>(false)
init() {
restAPI.network.requestRetrier = { [unowned self] _, error in
if self.isRetrying.value == true {
return self.isRetrying.filter({ !$0 }).asVoid().eraseToAnyPublisher()
}
guard let error = error as? NetworkingError, error.status == .unauthorized else {
return nil
}
return restAPI.authenticate().eraseToAnyPublisher()
}
}Thanks @denis-obukhov for this improvement !
0.3.3
- Adds watchOS support ⌚ thanks to @fordee
- Adds tvOS support 📺
- Adds custom URSessionConfiguration thanks @alladinian
- Adds cURL logging for simpler debugging thanks @MaxenceLvl
- Adds custom timeout thanks @workingDog
- Fixes jsonPayload not parsing (0.3.2 regression)
- Fixes dictionary param encoding thanks @bfolkens
- Fix bad URL crash
⚠️ Deprecated 0.3.2
jsonPayload error parsing, use 0.3.1 for now until next version.
Thanks @workingDog & @linsyorozuya for this release 👏
Dispatcher.main
PATCH, JSON parameter encoding, swift-tools-version: 5.3
- Bumps to
swift-tools-version:5.3 - Adds
PATCHrequests - Adds
JSONparameter encoding
0.2.0
First version of Networking
This version is used in production in our App <3