I got objc_exception_throw when trying to set cookies for a ASIHTTPRequest request. I tried both of these but it didn't work out.
ASIHTTPRequest *request = [[ASIHTTPRequest alloc] initWithURL:url];
NSMutableDictionary *properties = [[NSMutableDictionary alloc] init];
[properties setValue:@".google.com" forKey:@"Domain"];
[properties setValue:@"/" forKey:@"path"];
[properties setValue:@"1600000000" forKey:@"expires"];
NSHTTPCookie *cookie = [[NSHTTPCookie alloc] initWithProperties:properties];
[request setRequestCookies:[NSMutableArray arrayWithObject:cookie]];
or replacing initiating code for cookie with this one
NSHTTPCookie *cookie = [[NSHTTPCookie alloc] init];
When I commented out the following line, everything worked fine.
[request setRequestCookies:[NSMutableArray arrayWithObject:cookie]];
Can you guys tell me what the problem here!