midiOS
What is URLSession in iOS?
Updated May 6, 2026
Short answer
URLSession is used for network requests.
Deep explanation
It handles HTTP requests, caching, and background transfers.
Real-world example
Fetching weather or API data.
Common mistakes
- Not handling threading properly.
Follow-up questions
- What is URLRequest?
- How to cancel a task?