title: How can I build a URL with query parameters containing multiple values for the same key in Swift?
body: <p>I am using AFNetworking in my iOS app and for all the GET requests it makes, I build the url from a base URL and than add parameters using NSDictionary Key-Value pairs.</p>
  
  <p>The problem is that I need same key for different values.</p>
  
  <p>Here is an example of what I need the finally URL to look like -</p>
  
  <p><a href="http://example.com/.....&amp;id=21212&amp;id=21212&amp;id=33232" rel="noreferrer">http://example.com/.....&amp;id=21212&amp;id=21212&amp;id=33232</a></p>
  
  <p>It's not possible in NSDictionary to have different values in same keys. So I tried NSSet but did not work.</p>
  
  <pre><code>let productIDSet: Set = [prodIDArray]
  let paramDict = NSMutableDictionary()
  paramDict.setObject(productIDSet, forKey: "id")
  </code></pre>