Creating a NSHTTPCookie
Creating a NSHTTPCookie
- Subject: Creating a NSHTTPCookie
- From: Chris <email@hidden>
- Date: Mon, 04 May 2009 09:25:00 -0700
Hello,
I'm trying to create a NSHTTPCookie with this code:
//dictionary of attributes for the new cookie
NSDictionary *newCookieDict = [NSMutableDictionary
dictionaryWithObjectsAndKeys:@".example.com", NSHTTPCookieDomain,
@"Test Cookie", NSHTTPCookieName,
@"/", NSHTTPCookiePath,
@"test12345", NSHTTPCookieValue,
@"2010-05-03 21:02:41 -0700", NSHTTPCookieExpires, nil];
//create a new cookie
NSHTTPCookie *newCookie = [NSHTTPCookie
cookieWithProperties:newCookieDict];
//add the new cookie
[[NSHTTPCookieStorage sharedHTTPCookieStorage] setCookie:newCookie];
When I try to set the newly created cookie to the
sharedHTTPCookieStorage it doesn't ever get set. Am I doing something
wrong?
Thanks!
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden