Answer the question
In order to leave comments, you need to log in
Why is there an error on URLRequest?
There is this code:
import Cocoa
var request = URLRequest(url: URL(string: "https://finnhub.io/api/v1/index/constituents?symbol=^DJI&token=c16aimn48v6ppg7elmog")!)
let task = URLSession.shared.dataTask(with: request) { data, response, error in
print(String(decoding: data!, as: UTF8.self))
}
task.resume()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question