In this tutorial, you learn how to combine and chain publishers in Combine with Publishers.Zip and flatMap().
What if a HTTP network request depends on the response of another? In this tutorial, we’ll discuss how you can parallelize and/or serialize networking tasks with Combine.
Here’s what we’ll get into:
- Combining multiple Combine publishers in Swift
- Working with
Publishers``.``Zip
and flatMap()
- How subscribers and publishers work in Combine
- Getting to know Combine’s generics and types
- Working with JSON and
Codable
with Combine
- Making network requests with Combine and
URLSession
- Getting to know various Combine operators, like
map``()
- Practical use cases for combining and chaining publishers
Ready? Let’s go.
- Why Combine Multiple HTTP Requests?
- Working with Combine in Swift
- Combining Publishers with Publishers.Zip
- Chaining Publishers with flatMap()
- Wrapping Up
- Further Reading
#swift #mobile-apps #programming #developer