{ "id": "125339", "key": "AC-1936", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2014-01-31T04:40:44.000+0000", "created": "2014-01-23T23:15:39.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:40:51.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14544", "name": "Alloy", "description": "Please enter tickets related to the Alloy here." }, { "id": "14551", "name": "Studio", "description": "Please enter tickets related to Titanium Studio here." } ], "description": "We're using api key authentication for our app, but the new cookie management in 3.2.0 for Android is obfuscated and does not work as expected.\r\n\r\nI need to grab cookies from the webview and then load the cookies into our HttpClient requests. iOS uses the same cookie store, but Android needs to use the new cookie system introduced in 3.2.0.\r\n\r\nI'm able to retrieve the cookies using:\r\n`Ti.Network.getSystemCookies()`\r\nfrom the WebView.\r\n\r\nHowever, when I run:\r\n`Ti.Network.addHTTPCookie(cookie);`\r\nIt fails.\r\n\r\nWhat has worked is manually generating the cookie string and setting it as a header with setRequestHeader('Cookie:', ); I feel like that's not the correct way to do it.\r\n\r\nThanks!", "attachment": [], "flagged": false, "summary": "Ti.Network.addHTTPCookie doesn't work", "creator": { "name": "pseudonumos", "key": "pseudonumos", "displayName": "Timothy Liu", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "pseudonumos", "key": "pseudonumos", "displayName": "Timothy Liu", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Mac OS X 10.9\r\nAndroid", "comment": { "comments": [ { "id": "289564", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Android and iOS platforms use different cookie management scheme so Titanium SDK 3.2.0 tries to bring parity between these two platforms. You may want to try the sample attached with TIMOB-15244 ticket and see if it resolves your issue.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-24T06:58:41.000+0000", "updated": "2014-01-24T06:58:41.000+0000" }, { "id": "290584", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Resolving this ticket as the reporter did not follow up on the suggestion and did not provide a runnable test case to reproduce this problem.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-31T04:40:44.000+0000", "updated": "2014-01-31T04:40:44.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }