{"action":"created","issue":{"url":"https://api.github.com/repos/tmpvar/jsdom/issues/310","labels_url":"https://api.github.com/repos/tmpvar/jsdom/issues/310/labels{/name}","comments_url":"https://api.github.com/repos/tmpvar/jsdom/issues/310/comments","events_url":"https://api.github.com/repos/tmpvar/jsdom/issues/310/events","html_url":"https://github.com/tmpvar/jsdom/issues/310","id":1664510,"number":310,"title":"Cookie/Session Data","user":{"login":"ses1984","id":806757,"avatar_url":"https://avatars.githubusercontent.com/u/806757?v=3","gravatar_id":"","url":"https://api.github.com/users/ses1984","html_url":"https://github.com/ses1984","followers_url":"https://api.github.com/users/ses1984/followers","following_url":"https://api.github.com/users/ses1984/following{/other_user}","gists_url":"https://api.github.com/users/ses1984/gists{/gist_id}","starred_url":"https://api.github.com/users/ses1984/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ses1984/subscriptions","organizations_url":"https://api.github.com/users/ses1984/orgs","repos_url":"https://api.github.com/users/ses1984/repos","events_url":"https://api.github.com/users/ses1984/events{/privacy}","received_events_url":"https://api.github.com/users/ses1984/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tmpvar/jsdom/labels/feature","name":"feature","color":"02e10c"},{"url":"https://api.github.com/repos/tmpvar/jsdom/labels/needs%20tests","name":"needs tests","color":"00FF00"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2011-09-16T18:13:49Z","updated_at":"2015-06-26T12:43:10Z","closed_at":"2015-06-26T12:43:10Z","body":"Hi, first I would like to say thanks for this awesome project. I love the idea of it. I also have to say that my skill level is not high. I've done some useful front and back end web development but I lack a lot of under-the-hood knowledge that would facilitate being able to hack on projects that are not my own.\r\n\r\nI tried searching this page for 'cookie' or 'session' and found no results so I figured that it wouldn't hurt to share my problem here.\r\n\r\nI also have to say that I'm not sure if using jsdom is the best approach to this problem. I went for jsdom first because I know how to poke the DOM with javascript and I was a little scared of trying to parse the output of the printer's web server in another language.\r\n\r\nI am trying to automate a task that I have to do at my job that requires going through our main copier/printer's web interface. In short, I physically scan a document at the machine, then I want to get the scanned document from the printer's web interface and into a queue on a server for processing.\r\n\r\nIt was quite difficult trying to figure out exactly what was going on as most of the web interface is composed of nasty nested frames and links to javascript functions that build cgi request strings. After some effort I was finally able to specify what my script needs to do:\r\n* Visit the printer's main page to set a cookie that gives me permission to access other pages\r\n* Visit a page that has the ID number of the document I want to process\r\n* Visit  the document's page to get the ID numbers corresponding to the document images (one image file per page)\r\n* For each image ID found, request that image and put it in my processing queue\r\n\r\nDespite the fact that there is no password protection or security of any kind, you have to visit the printer's main page first, and some kind of certificate is assigned to your session, I think in the form of a cookie that stores a number; if the cookie is cleared then it's back to error pages until you go back to the printer's home page.\r\n\r\nI need some way for jsdom to set this cookie otherwise it seems like my problem is not really meant to be covered under jsdom.\r\n\r\nThanks for your help."},"comment":{"url":"https://api.github.com/repos/tmpvar/jsdom/issues/comments/115666890","html_url":"https://github.com/tmpvar/jsdom/issues/310#issuecomment-115666890","issue_url":"https://api.github.com/repos/tmpvar/jsdom/issues/310","id":115666890,"user":{"login":"domenic","id":617481,"avatar_url":"https://avatars.githubusercontent.com/u/617481?v=3","gravatar_id":"","url":"https://api.github.com/users/domenic","html_url":"https://github.com/domenic","followers_url":"https://api.github.com/users/domenic/followers","following_url":"https://api.github.com/users/domenic/following{/other_user}","gists_url":"https://api.github.com/users/domenic/gists{/gist_id}","starred_url":"https://api.github.com/users/domenic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domenic/subscriptions","organizations_url":"https://api.github.com/users/domenic/orgs","repos_url":"https://api.github.com/users/domenic/repos","events_url":"https://api.github.com/users/domenic/events{/privacy}","received_events_url":"https://api.github.com/users/domenic/received_events","type":"User","site_admin":false},"created_at":"2015-06-26T12:43:10Z","updated_at":"2015-06-26T12:43:10Z","body":"document.cookie works as of 5.0.0!"}}