Here is my code and the error code being generated during build.
let myString : String = "https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbol=AAPL&apikey= D5GY7HKODE66G0T9" var banjo = URL(string: myString) let task = URLSession.shared.dataTask(with:banjo ) { myDatastring , response , error in} // task.resume()
I've tested that URL in my browser and it works. But when I try to build I get: Value of optional type 'URL?' must be unwrapped to a value of type 'URL'
Please tell me what I'm doing wrong. I think the URL struct is not returning a URL type of object.