Daily iOS
Networking

URLSession structure

You've inherited an app that does all its networking through URLSession.shared. Can you walk me through the objects involved when URLSession handles one request (session, configuration, task) and what each one is responsible for?

How would an interviewer hear this answer? You'll see whether they'd move on, dig in, or say no, and which sentences would trip you up. Your score doesn't change.
See the short answer

URLSession sets policy through a configuration and runs each request as a task (data, upload, download, or websocket). shared is a convenience singleton with the default configuration and no delegate.

Share a question