I have an app that makes a whole bunch of different REST calls to the same server from a bunch of different view controllers. What’s best practice with regard to URLSession
: Share the same URLSession object? Or just the URLSessionConfiguration object? Or doesn’t matter about either?
For example, when making request to an endpoint, should I
Instantiate a brand new
URLSession
each request with with the sharedURLSessionConfiguration
?Instantiate a single
URLSession
once for the current active app instance, and reuse it across all requests?