Skip to content

Releases: freshOS/Networking

0.3.4

Choose a tag to compare

@s4cha s4cha released this 28 Oct 14:06
8792ccd
  • 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

Choose a tag to compare

@s4cha s4cha released this 17 Sep 13:22
  • 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

Choose a tag to compare

@s4cha s4cha released this 11 Nov 16:30
9608676

⚠️ 0.3.2 broke jsonPayload error parsing, use 0.3.1 for now until next version.

  • Fixes NSNull crash parsing #15
  • Improves error parsing #13

Thanks @workingDog & @linsyorozuya for this release 👏

Dispatcher.main

Choose a tag to compare

@s4cha s4cha released this 27 Oct 09:01
b18883b
  • Replaces RunLoop.main calls by DispatchQueue.main as discussed in swift forums here
    Thank you @arunrd for this fix. #8 🎉

PATCH, JSON parameter encoding, swift-tools-version: 5.3

Choose a tag to compare

@s4cha s4cha released this 23 Sep 12:13
  • Bumps to swift-tools-version:5.3
  • Adds PATCH requests
  • Adds JSON parameter encoding

0.2.0

Choose a tag to compare

@s4cha s4cha released this 29 Jul 15:25
Lints code + clean

First version of Networking

Choose a tag to compare

@s4cha s4cha released this 25 Mar 13:58

This version is used in production in our App <3