Suggested approach: There are so many ways of answering this (not least “use Alamofire”), but the main thing is to demonstrate that you know it needs to be asynchronous to avoid blocking the main thread. Don't forget to mention the need to push work back to the main thread when it's time to update the user interface.
For bonus points, mention that this is the kind of work Combine just eats up.
Estimated difficulty: Easy
UserDefaultsgood for? What is
UserDefaultsnot good for?
Link copied to your pasteboard.