Hi, I'm using a database to get some values, and i don't understand why the NSURL return nil. Here the code that works :
let urlString = "https://api.mlab.com/api/1/databases/lampadaire/collections/lampadaire?&apiKey=0HW9bYZVJEvmmV93Yo8jYADX3gWczJie"
print(urlString) // this return https://api.mlab.com/api/1/databases/lampadaire/collections/lampadaire?&apiKey=0HW9bYZVJEvmmV93Yo8jYADX3gWczJie
print(NSURL(string: urlString)) // return a thingYou can try the URL in the adress bar, it returns JSON, but when i tried to put a query inside, it doesn't work :
rlString = "https://api.mlab.com/api/1/databases/lampadaire/collections/lampadaire?q={\"lampadaire_id\":1}&apiKey=0HW9bYZVJEvmmV93Yo8jYADX3gWczJie"
print(urlString) // this return https://api.mlab.com/api/1/databases/lampadaire/collections/lampadaire?q={"lampadaire_id":1}&apiKey=0HW9bYZVJEvmmV93Yo8jYADX3gWczJie
print(NSURL(string: urlString)) // return nilYou can try the URL in the adress bar, it returns JSON too. I think it's because of the double quote in the query, how can I pass it please ?