You can watch this episode by subscribing to Cocoacasts Plus.

Building a Modern Networking Layer in Swift

Hiding Implementation Details with Type Erasure

The video view model is no longer required to pass an access token to the API client if it requests the video of an episode. That is a welcome improvement. The API client passes an access token to an APIEndpoint object and it is the APIEndpoint object that decides when it is appropriate to add an Authorization header to a request. The changes we made in the previous episode improved the networking layer we are building.

Instant and Unlimited Access
to 500+ Cocoacasts Tutorials

Monthly

$19 / month

Pay Once a Month
30 Day Money Back Guarantee

Yearly

$8.25 / month (billed annually)

Pay Once a Year and Save $129
30 Day Money Back Guarantee