Post

Replies

Boosts

Views

Activity

Can't get a simple network call working. Novice developer.
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.
Topic: Design SubTopic: General
2
0
256
4d