{"action":"created","issue":{"url":"https://api.github.com/repos/request/request/issues/1502","labels_url":"https://api.github.com/repos/request/request/issues/1502/labels{/name}","comments_url":"https://api.github.com/repos/request/request/issues/1502/comments","events_url":"https://api.github.com/repos/request/request/issues/1502/events","html_url":"https://github.com/request/request/issues/1502","id":63793706,"number":1502,"title":"Cookies lost during multiple redirects","user":{"login":"Nijikokun","id":198276,"avatar_url":"https://avatars.githubusercontent.com/u/198276?v=3","gravatar_id":"","url":"https://api.github.com/users/Nijikokun","html_url":"https://github.com/Nijikokun","followers_url":"https://api.github.com/users/Nijikokun/followers","following_url":"https://api.github.com/users/Nijikokun/following{/other_user}","gists_url":"https://api.github.com/users/Nijikokun/gists{/gist_id}","starred_url":"https://api.github.com/users/Nijikokun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nijikokun/subscriptions","organizations_url":"https://api.github.com/users/Nijikokun/orgs","repos_url":"https://api.github.com/users/Nijikokun/repos","events_url":"https://api.github.com/users/Nijikokun/events{/privacy}","received_events_url":"https://api.github.com/users/Nijikokun/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"lalitkapoor","id":140436,"avatar_url":"https://avatars.githubusercontent.com/u/140436?v=3","gravatar_id":"","url":"https://api.github.com/users/lalitkapoor","html_url":"https://github.com/lalitkapoor","followers_url":"https://api.github.com/users/lalitkapoor/followers","following_url":"https://api.github.com/users/lalitkapoor/following{/other_user}","gists_url":"https://api.github.com/users/lalitkapoor/gists{/gist_id}","starred_url":"https://api.github.com/users/lalitkapoor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lalitkapoor/subscriptions","organizations_url":"https://api.github.com/users/lalitkapoor/orgs","repos_url":"https://api.github.com/users/lalitkapoor/repos","events_url":"https://api.github.com/users/lalitkapoor/events{/privacy}","received_events_url":"https://api.github.com/users/lalitkapoor/received_events","type":"User","site_admin":false},"milestone":null,"comments":17,"created_at":"2015-03-23T18:13:58Z","updated_at":"2015-05-20T09:11:50Z","closed_at":"2015-04-04T04:08:30Z","body":"1. Put a cookie on a 302\r\n2. Do another 302\r\n3. View headers, cookie from the first 302 does not exist."},"comment":{"url":"https://api.github.com/repos/request/request/issues/comments/103819128","html_url":"https://github.com/request/request/issues/1502#issuecomment-103819128","issue_url":"https://api.github.com/repos/request/request/issues/1502","id":103819128,"user":{"login":"jazarja","id":1103551,"avatar_url":"https://avatars.githubusercontent.com/u/1103551?v=3","gravatar_id":"","url":"https://api.github.com/users/jazarja","html_url":"https://github.com/jazarja","followers_url":"https://api.github.com/users/jazarja/followers","following_url":"https://api.github.com/users/jazarja/following{/other_user}","gists_url":"https://api.github.com/users/jazarja/gists{/gist_id}","starred_url":"https://api.github.com/users/jazarja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jazarja/subscriptions","organizations_url":"https://api.github.com/users/jazarja/orgs","repos_url":"https://api.github.com/users/jazarja/repos","events_url":"https://api.github.com/users/jazarja/events{/privacy}","received_events_url":"https://api.github.com/users/jazarja/received_events","type":"User","site_admin":false},"created_at":"2015-05-20T09:11:50Z","updated_at":"2015-05-20T09:11:50Z","body":"Having similiar problem with redirection cookie, I use the following code to extract cookie on first redirection:\r\n\r\n```javascript\r\nvar httpreq = {\r\n                    ...\r\n                    jar: cookieJar\r\n                };\r\n\r\n               \r\n\r\nrequest(httpreq, function (error, response, body) {                   \r\n                    if (typeof response.headers[\"set-cookie\"]!='undefined') {\r\n                        response.headers[\"set-cookie\"].forEach(function(aCookie)\r\n                        {\r\n                            cookieJar.getCookieString(aCookie);\r\n                        });\r\n                    }\r\n});\r\n```"}}