I am trying to create an URL something like it https://api.website.com/products?product_ids=1,2,3,4,5 Using integer array from CoreData
So far I do have this code
let array = [1,2,3,4,5]
var urlComponents = URLComponents()
urlComponents.scheme = "https"
urlComponents.host = "api.website.com"
urlComponents.path = "/products"
urlComponents.queryItems = [
URLQueryItem(name: "product_ids", value: ???????),
]
How can I add my array data to get a full URL I needed? https://api.website.com/products?product_ids=1,2,3,4,5