A Swift Foundation structure that parses URLs into and constructs URLs from their constituent parts.
URLComponents
is a Swift Foundation structure that parses URLs into and constructs URLs from their constituent parts. Specifically, it allows you to add queries and other components to a URL, and URLComponents
And URLQueryItem
will perform the necessary percent-encoding as contemplated in RFC3986.
See also
- nsurlcomponents is Objective-C equivalent class