Type safe network layer 2.0

twittemb.github.io

There are plenty of posts about doing a network layer in a type safe way with Swift. No matter the used network API, those approaches all rely on returning a data type that is precisely what we expect. The idea is to leverage the type inference / generics abilities of Swift to avoid casting the returned type. In this post we will try to go a little bit further by strongly coupling the endpoint we want to fetch and the data type it has to return.

Read more...
Linkedin

Want to receive more content like this in your inbox?