Just a quick reminder that you can use URLComponents to build URLs with query components.
🌟 It is great because it automatically percent encodes any query item strings!
🔗 developer.apple.com/document…#iosdev#swiftlang
Learn how to deal with common URL scenarios
avanderlee.com/swift/url-com…
🧩 Working with URLComponents
🤓 Smart extensions to make your life easier
💪🏻 Writing and ready query items
#swiftlang#iosdev
One of my first blog posts ever was on URLComponents!
Well, NSURLComponents, because it was written for Objective-C, back in... 2014! 😆
masilotti.com/nsurlqueryitem…
Pretty sure I failed an interview once because I used string interpolation instead of saying I’d use URLComponents. I learned about them real quick after that. Lol
So today I learnt a very fun new thing. If you use URLComponents in swift, you can pass parameters separately, outside the base url. I’m gonna be using this for parameter passing in my apis