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.
The problem is that I need same key for different values.
Here is an example of what I need the finally URL to look like -
http://example.com/.....&id=21212&id=21212&id=33232
It's not possible in NSDictionary to have different values in same keys. So I tried NSSet but did not work.
let productIDSet: Set = [prodIDArray]
let paramDict = NSMutableDictionary()
paramDict.setObject(productIDSet, forKey: "id")
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…