Skip to content

Instantly share code, notes, and snippets.

@mkujalowicz
mkujalowicz / url_encoding.playground
Last active September 27, 2016 16:23
Swift playground for testing standard iOS URL encoding methods
//: Playground - noun: a place where people can play
import UIKit
extension Dictionary where Key: ExpressibleByStringLiteral, Value: ExpressibleByStringLiteral {
var queryItems: [URLQueryItem] {
return map {
return URLQueryItem(name: String(describing: $0), value: String(describing: $1))
}
}