I'm trying to create an URLComponents
object so I can extract parameters values from a string. I have the string topic_id12&lessong_id=45
:
let dataString = "topic_id12&lessong_id=45"
guard let urlComponents = URLComponents(string: "https://somedomain.com/\(dataString)/") else return { nil }
However the init fails. Any ideas what I'm missing here? Thanks