Here's an example of how to load a request in Swift using URLSession:
main.swift848 chars32 linesIn this example, we create a URLRequest and add an authorization header. We then create a URLSession and a dataTask with the request. Finally, we handle the response and the data that's returned.
gistlibby LogSnag