TestsTested | ✓ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Sep 2016 |
SPMSupports SPM | ✗ |
Maintained by Yury Korolev.
Construct urls from scratch
NSURL.build(scheme: "tel", path: "+7 (910) 670 14 00") // #> NSURL "tel:+7%20(910)%20670%2014%2000"
Use BaseURL
let baseURL = NSURL(string: "https://google.com")!
baseURL.build(query: ["q": "Safe URL"]) // #> NSURL "https://google.com?q=Safe%20URL"
Build paths. No unsafe string interpolations
let baseURL = NSURL(string: "https://example.com/api/v1/")!
let userId = 1
baseURL.build(["users", userId]) // #> NSURL "https://example.com/api/v1/users/1"
SafeURL is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "SafeURL"
Yury Korolev, [email protected]
SafeURL is available under the MIT license. See the LICENSE file for more info.