• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Creating a NSHTTPCookie
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Creating a NSHTTPCookie


  • Subject: Creating a NSHTTPCookie
  • From: Chris <email@hidden>
  • Date: Sun, 03 May 2009 23:58:02 -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


  • Follow-Ups:
    • Re: Creating a NSHTTPCookie
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Re: NSImage initWithContentsOfURL slowness
  • Next by Date: Integer as key in NSMutableDictionary
  • Previous by thread: Re: Why is -makeWindowControllers getting called twice?
  • Next by thread: Re: Creating a NSHTTPCookie
  • Index(es):
    • Date
    • Thread