{"action":"created","issue":{"url":"https://api.github.com/repos/daltoniam/SwiftHTTP/issues/45","labels_url":"https://api.github.com/repos/daltoniam/SwiftHTTP/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/daltoniam/SwiftHTTP/issues/45/comments","events_url":"https://api.github.com/repos/daltoniam/SwiftHTTP/issues/45/events","html_url":"https://github.com/daltoniam/SwiftHTTP/issues/45","id":53613955,"number":45,"title":"How to save the cookie persistence","user":{"login":"yaochangjun","id":3000425,"avatar_url":"https://avatars.githubusercontent.com/u/3000425?v=3","gravatar_id":"","url":"https://api.github.com/users/yaochangjun","html_url":"https://github.com/yaochangjun","followers_url":"https://api.github.com/users/yaochangjun/followers","following_url":"https://api.github.com/users/yaochangjun/following{/other_user}","gists_url":"https://api.github.com/users/yaochangjun/gists{/gist_id}","starred_url":"https://api.github.com/users/yaochangjun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yaochangjun/subscriptions","organizations_url":"https://api.github.com/users/yaochangjun/orgs","repos_url":"https://api.github.com/users/yaochangjun/repos","events_url":"https://api.github.com/users/yaochangjun/events{/privacy}","received_events_url":"https://api.github.com/users/yaochangjun/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-07T09:38:59Z","updated_at":"2015-01-07T15:55:45Z","closed_at":null,"body":"I have two button in test app, one is check the status of login and the second is login\r\n1、I click the login button \r\n2、The login status is true When I click the check button\r\n3、Close the application and open again\r\n4、The login status is false When I click the check button\r\nWe use sessionid in cookies to check login status in server"},"comment":{"url":"https://api.github.com/repos/daltoniam/SwiftHTTP/issues/comments/69041840","html_url":"https://github.com/daltoniam/SwiftHTTP/issues/45#issuecomment-69041840","issue_url":"https://api.github.com/repos/daltoniam/SwiftHTTP/issues/45","id":69041840,"user":{"login":"acmacalister","id":1024755,"avatar_url":"https://avatars.githubusercontent.com/u/1024755?v=3","gravatar_id":"","url":"https://api.github.com/users/acmacalister","html_url":"https://github.com/acmacalister","followers_url":"https://api.github.com/users/acmacalister/followers","following_url":"https://api.github.com/users/acmacalister/following{/other_user}","gists_url":"https://api.github.com/users/acmacalister/gists{/gist_id}","starred_url":"https://api.github.com/users/acmacalister/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acmacalister/subscriptions","organizations_url":"https://api.github.com/users/acmacalister/orgs","repos_url":"https://api.github.com/users/acmacalister/repos","events_url":"https://api.github.com/users/acmacalister/events{/privacy}","received_events_url":"https://api.github.com/users/acmacalister/received_events","type":"User","site_admin":false},"created_at":"2015-01-07T15:55:45Z","updated_at":"2015-01-07T15:55:45Z","body":"If you want to persist an authentication, you would set the `NSURLCredential` persistence to the desired value. You can see more about that in the Apple Docs here.\r\n\r\nhttps://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSURLCredential_Class/index.html#//apple_ref/c/tdef/NSURLCredentialPersistence\r\n\r\nIf you are looking to manage cookies, you would use the `NSHTTPCookieStorage`. Docs for that are located here.\r\n\r\nhttps://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSHTTPCookieStorage_Class/index.html"}}