URLSession with async await

Modern Swift makes network requests easier to read with async and await . URLSession provides asynchronous methods that return data and a response without completion handlers. Creating a Network Model The response model should conform to Decodable : struct Todo: Decodable, Identifiable { let id: Int let title: String let completed: Bool } Fetching Data Create a request, validate the response, and…