Implement the Builder Design Pattern in Swift 5

Create and work with custom URLRequests and URLSessionDataTasks

Zafar Ivaev
Better Programming
Published in
3 min readMar 2, 2020

--

Photo by Artem Labunsky on Unsplash

In this tutorial, we will learn about the Builder design pattern and implement a URLRequest and URLSessionDataTask with it.

The source code of an Xcode playground is available on GitHub.

The Pattern’s Definition

--

--

Senior iOS Engineer. I write about features of Swift and iOS development practices.