{"action":"created","comment":{"url":"https://api.github.com/repos/request/request/pulls/comments/25868723","id":25868723,"diff_hunk":"@@ -1413,6 +1413,28 @@ Request.prototype.jar = function (jar) {\n   return self\n }\n \n+Request.prototype.cloneJar = function (cookieJar) {\n+  var self = this\n+  var newJar, cookieString, cookieStore, domains, domainPaths, cookieUrl\n+\n+  newJar = self.jar()\n+  cookieStore = cookieJar._jar.store.idx","path":"request.js","position":27,"original_position":27,"commit_id":"0511ebf7f577653e63e3d7d86fbf14af30536b2e","original_commit_id":"0511ebf7f577653e63e3d7d86fbf14af30536b2e","user":{"login":"Narzerus","id":1808674,"avatar_url":"https://avatars.githubusercontent.com/u/1808674?v=3","gravatar_id":"","url":"https://api.github.com/users/Narzerus","html_url":"https://github.com/Narzerus","followers_url":"https://api.github.com/users/Narzerus/followers","following_url":"https://api.github.com/users/Narzerus/following{/other_user}","gists_url":"https://api.github.com/users/Narzerus/gists{/gist_id}","starred_url":"https://api.github.com/users/Narzerus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Narzerus/subscriptions","organizations_url":"https://api.github.com/users/Narzerus/orgs","repos_url":"https://api.github.com/users/Narzerus/repos","events_url":"https://api.github.com/users/Narzerus/events{/privacy}","received_events_url":"https://api.github.com/users/Narzerus/received_events","type":"User","site_admin":false},"body":"Let me try some stuff, I'll let you know, I didn't want to iterate over the idx keys either but so far it has proven the only useful way. Passing a store to the request.jar() method gives a tough-cookie error at some point where the store is asyncronous.","created_at":"2015-03-05T14:54:34Z","updated_at":"2015-03-05T14:54:34Z","html_url":"https://github.com/request/request/pull/1458#discussion_r25868723","pull_request_url":"https://api.github.com/repos/request/request/pulls/1458","_links":{"self":{"href":"https://api.github.com/repos/request/request/pulls/comments/25868723"},"html":{"href":"https://github.com/request/request/pull/1458#discussion_r25868723"},"pull_request":{"href":"https://api.github.com/repos/request/request/pulls/1458"}}},"pull_request":{"url":"https://api.github.com/repos/request/request/pulls/1458","id":30510232,"html_url":"https://github.com/request/request/pull/1458","diff_url":"https://github.com/request/request/pull/1458.diff","patch_url":"https://github.com/request/request/pull/1458.patch","issue_url":"https://api.github.com/repos/request/request/issues/1458","number":1458,"state":"open","locked":false,"title":"Add cloneJar method","user":{"login":"Narzerus","id":1808674,"avatar_url":"https://avatars.githubusercontent.com/u/1808674?v=3","gravatar_id":"","url":"https://api.github.com/users/Narzerus","html_url":"https://github.com/Narzerus","followers_url":"https://api.github.com/users/Narzerus/followers","following_url":"https://api.github.com/users/Narzerus/following{/other_user}","gists_url":"https://api.github.com/users/Narzerus/gists{/gist_id}","starred_url":"https://api.github.com/users/Narzerus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Narzerus/subscriptions","organizations_url":"https://api.github.com/users/Narzerus/orgs","repos_url":"https://api.github.com/users/Narzerus/repos","events_url":"https://api.github.com/users/Narzerus/events{/privacy}","received_events_url":"https://api.github.com/users/Narzerus/received_events","type":"User","site_admin":false},"body":"Some complex libraries that depend on `request` require the ability to clone the cookie jar, because of the way the jar is implemented cloning a `tough-cookie` cookie jar will not work therefore the object must be re-built by setting each cookie individually.\r\n\r\nI wanted to add some basic tests (though the code is tested in my end) but the way you guys are doing your tests is overcomplicated, maybe consider using mocha or another test runner. Also you can mock the `http` package with `nock`. But well thats a different topic","created_at":"2015-03-04T22:15:06Z","updated_at":"2015-03-05T14:54:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"133c3f28c7b38aa72f8e709b419c50a77b730681","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/request/request/pulls/1458/commits","review_comments_url":"https://api.github.com/repos/request/request/pulls/1458/comments","review_comment_url":"https://api.github.com/repos/request/request/pulls/comments{/number}","comments_url":"https://api.github.com/repos/request/request/issues/1458/comments","statuses_url":"https://api.github.com/repos/request/request/statuses/0511ebf7f577653e63e3d7d86fbf14af30536b2e","head":{"label":"Narzerus:feature/clone-cookie-jar","ref":"feature/clone-cookie-jar","sha":"0511ebf7f577653e63e3d7d86fbf14af30536b2e","user":{"login":"Narzerus","id":1808674,"avatar_url":"https://avatars.githubusercontent.com/u/1808674?v=3","gravatar_id":"","url":"https://api.github.com/users/Narzerus","html_url":"https://github.com/Narzerus","followers_url":"https://api.github.com/users/Narzerus/followers","following_url":"https://api.github.com/users/Narzerus/following{/other_user}","gists_url":"https://api.github.com/users/Narzerus/gists{/gist_id}","starred_url":"https://api.github.com/users/Narzerus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Narzerus/subscriptions","organizations_url":"https://api.github.com/users/Narzerus/orgs","repos_url":"https://api.github.com/users/Narzerus/repos","events_url":"https://api.github.com/users/Narzerus/events{/privacy}","received_events_url":"https://api.github.com/users/Narzerus/received_events","type":"User","site_admin":false},"repo":{"id":31682605,"name":"request","full_name":"Narzerus/request","owner":{"login":"Narzerus","id":1808674,"avatar_url":"https://avatars.githubusercontent.com/u/1808674?v=3","gravatar_id":"","url":"https://api.github.com/users/Narzerus","html_url":"https://github.com/Narzerus","followers_url":"https://api.github.com/users/Narzerus/followers","following_url":"https://api.github.com/users/Narzerus/following{/other_user}","gists_url":"https://api.github.com/users/Narzerus/gists{/gist_id}","starred_url":"https://api.github.com/users/Narzerus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Narzerus/subscriptions","organizations_url":"https://api.github.com/users/Narzerus/orgs","repos_url":"https://api.github.com/users/Narzerus/repos","events_url":"https://api.github.com/users/Narzerus/events{/privacy}","received_events_url":"https://api.github.com/users/Narzerus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Narzerus/request","description":"Simplified HTTP request client.","fork":true,"url":"https://api.github.com/repos/Narzerus/request","forks_url":"https://api.github.com/repos/Narzerus/request/forks","keys_url":"https://api.github.com/repos/Narzerus/request/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Narzerus/request/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Narzerus/request/teams","hooks_url":"https://api.github.com/repos/Narzerus/request/hooks","issue_events_url":"https://api.github.com/repos/Narzerus/request/issues/events{/number}","events_url":"https://api.github.com/repos/Narzerus/request/events","assignees_url":"https://api.github.com/repos/Narzerus/request/assignees{/user}","branches_url":"https://api.github.com/repos/Narzerus/request/branches{/branch}","tags_url":"https://api.github.com/repos/Narzerus/request/tags","blobs_url":"https://api.github.com/repos/Narzerus/request/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Narzerus/request/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Narzerus/request/git/refs{/sha}","trees_url":"https://api.github.com/repos/Narzerus/request/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Narzerus/request/statuses/{sha}","languages_url":"https://api.github.com/repos/Narzerus/request/languages","stargazers_url":"https://api.github.com/repos/Narzerus/request/stargazers","contributors_url":"https://api.github.com/repos/Narzerus/request/contributors","subscribers_url":"https://api.github.com/repos/Narzerus/request/subscribers","subscription_url":"https://api.github.com/repos/Narzerus/request/subscription","commits_url":"https://api.github.com/repos/Narzerus/request/commits{/sha}","git_commits_url":"https://api.github.com/repos/Narzerus/request/git/commits{/sha}","comments_url":"https://api.github.com/repos/Narzerus/request/comments{/number}","issue_comment_url":"https://api.github.com/repos/Narzerus/request/issues/comments{/number}","contents_url":"https://api.github.com/repos/Narzerus/request/contents/{+path}","compare_url":"https://api.github.com/repos/Narzerus/request/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Narzerus/request/merges","archive_url":"https://api.github.com/repos/Narzerus/request/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Narzerus/request/downloads","issues_url":"https://api.github.com/repos/Narzerus/request/issues{/number}","pulls_url":"https://api.github.com/repos/Narzerus/request/pulls{/number}","milestones_url":"https://api.github.com/repos/Narzerus/request/milestones{/number}","notifications_url":"https://api.github.com/repos/Narzerus/request/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Narzerus/request/labels{/name}","releases_url":"https://api.github.com/repos/Narzerus/request/releases{/id}","created_at":"2015-03-04T22:11:07Z","updated_at":"2015-03-04T22:11:08Z","pushed_at":"2015-03-04T22:12:01Z","git_url":"git://github.com/Narzerus/request.git","ssh_url":"git@github.com:Narzerus/request.git","clone_url":"https://github.com/Narzerus/request.git","svn_url":"https://github.com/Narzerus/request","homepage":"","size":6065,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"request:master","ref":"master","sha":"a2c9ec7e28567bd58837b106abe1b9a03d881e1d","user":{"login":"request","id":730467,"avatar_url":"https://avatars.githubusercontent.com/u/730467?v=3","gravatar_id":"","url":"https://api.github.com/users/request","html_url":"https://github.com/request","followers_url":"https://api.github.com/users/request/followers","following_url":"https://api.github.com/users/request/following{/other_user}","gists_url":"https://api.github.com/users/request/gists{/gist_id}","starred_url":"https://api.github.com/users/request/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/request/subscriptions","organizations_url":"https://api.github.com/users/request/orgs","repos_url":"https://api.github.com/users/request/repos","events_url":"https://api.github.com/users/request/events{/privacy}","received_events_url":"https://api.github.com/users/request/received_events","type":"Organization","site_admin":false},"repo":{"id":1283503,"name":"request","full_name":"request/request","owner":{"login":"request","id":730467,"avatar_url":"https://avatars.githubusercontent.com/u/730467?v=3","gravatar_id":"","url":"https://api.github.com/users/request","html_url":"https://github.com/request","followers_url":"https://api.github.com/users/request/followers","following_url":"https://api.github.com/users/request/following{/other_user}","gists_url":"https://api.github.com/users/request/gists{/gist_id}","starred_url":"https://api.github.com/users/request/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/request/subscriptions","organizations_url":"https://api.github.com/users/request/orgs","repos_url":"https://api.github.com/users/request/repos","events_url":"https://api.github.com/users/request/events{/privacy}","received_events_url":"https://api.github.com/users/request/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/request/request","description":"Simplified HTTP request client.","fork":false,"url":"https://api.github.com/repos/request/request","forks_url":"https://api.github.com/repos/request/request/forks","keys_url":"https://api.github.com/repos/request/request/keys{/key_id}","collaborators_url":"https://api.github.com/repos/request/request/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/request/request/teams","hooks_url":"https://api.github.com/repos/request/request/hooks","issue_events_url":"https://api.github.com/repos/request/request/issues/events{/number}","events_url":"https://api.github.com/repos/request/request/events","assignees_url":"https://api.github.com/repos/request/request/assignees{/user}","branches_url":"https://api.github.com/repos/request/request/branches{/branch}","tags_url":"https://api.github.com/repos/request/request/tags","blobs_url":"https://api.github.com/repos/request/request/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/request/request/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/request/request/git/refs{/sha}","trees_url":"https://api.github.com/repos/request/request/git/trees{/sha}","statuses_url":"https://api.github.com/repos/request/request/statuses/{sha}","languages_url":"https://api.github.com/repos/request/request/languages","stargazers_url":"https://api.github.com/repos/request/request/stargazers","contributors_url":"https://api.github.com/repos/request/request/contributors","subscribers_url":"https://api.github.com/repos/request/request/subscribers","subscription_url":"https://api.github.com/repos/request/request/subscription","commits_url":"https://api.github.com/repos/request/request/commits{/sha}","git_commits_url":"https://api.github.com/repos/request/request/git/commits{/sha}","comments_url":"https://api.github.com/repos/request/request/comments{/number}","issue_comment_url":"https://api.github.com/repos/request/request/issues/comments{/number}","contents_url":"https://api.github.com/repos/request/request/contents/{+path}","compare_url":"https://api.github.com/repos/request/request/compare/{base}...{head}","merges_url":"https://api.github.com/repos/request/request/merges","archive_url":"https://api.github.com/repos/request/request/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/request/request/downloads","issues_url":"https://api.github.com/repos/request/request/issues{/number}","pulls_url":"https://api.github.com/repos/request/request/pulls{/number}","milestones_url":"https://api.github.com/repos/request/request/milestones{/number}","notifications_url":"https://api.github.com/repos/request/request/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/request/request/labels{/name}","releases_url":"https://api.github.com/repos/request/request/releases{/id}","created_at":"2011-01-23T01:25:14Z","updated_at":"2015-03-05T14:36:42Z","pushed_at":"2015-03-05T11:06:04Z","git_url":"git://github.com/request/request.git","ssh_url":"git@github.com:request/request.git","clone_url":"https://github.com/request/request.git","svn_url":"https://github.com/request/request","homepage":"","size":6065,"stargazers_count":6752,"watchers_count":6752,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":885,"mirror_url":null,"open_issues_count":97,"forks":885,"open_issues":97,"watchers":6752,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/request/request/pulls/1458"},"html":{"href":"https://github.com/request/request/pull/1458"},"issue":{"href":"https://api.github.com/repos/request/request/issues/1458"},"comments":{"href":"https://api.github.com/repos/request/request/issues/1458/comments"},"review_comments":{"href":"https://api.github.com/repos/request/request/pulls/1458/comments"},"review_comment":{"href":"https://api.github.com/repos/request/request/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/request/request/pulls/1458/commits"},"statuses":{"href":"https://api.github.com/repos/request/request/statuses/0511ebf7f577653e63e3d7d86fbf14af30536b2e"}}}}