I need to build a NSURL containing an array in the query segment. Array notation looks like this:
test.com?arr[a]=1&arr[b]=2
The problem here is that NSURL escapes the brackets so the final query segment looks like this:
test.com?arr%5Ba%5D=1&arr%5Bb%5D=2
After some research i stumbled upon the NSURLComponents class but just like i already expected, NSURLQueryItem objects can only take NSStrings as value and thus not create the wanted output either. I could not find a way to build a NSURL object containing unescaped brackets yet.
[NSURL URLWithString:@"test.com?arr[a]=1&arr[b]=2"]seems to work just fine - mag_zbc[NSURL URLWithString:@"test.com?arr[a]=1&arr[b]=2"]i get a NSURL object with escaped brackets. - dedda1994