We have two broad patterns that we can use with the URLSession framework. One is very simple and will suffice for many situations, and the other requires a fair amount of additional coding, but offers us a much greater degree of control and flexibility.
Both patterns deal with asynchronous requests that will not block further execution of your code. Synchronous requests are not covered in this chapter, and you will quite possibly never need them.