{"action":"opened","number":113,"pull_request":{"url":"https://api.github.com/repos/blakmatrix/node-zendesk/pulls/113","id":48025605,"html_url":"https://github.com/blakmatrix/node-zendesk/pull/113","diff_url":"https://github.com/blakmatrix/node-zendesk/pull/113.diff","patch_url":"https://github.com/blakmatrix/node-zendesk/pull/113.patch","issue_url":"https://api.github.com/repos/blakmatrix/node-zendesk/issues/113","number":113,"state":"open","locked":false,"title":"Fixes state issue where options where being shared between requests","user":{"login":"jonjaques","id":637410,"avatar_url":"https://avatars.githubusercontent.com/u/637410?v=3","gravatar_id":"","url":"https://api.github.com/users/jonjaques","html_url":"https://github.com/jonjaques","followers_url":"https://api.github.com/users/jonjaques/followers","following_url":"https://api.github.com/users/jonjaques/following{/other_user}","gists_url":"https://api.github.com/users/jonjaques/gists{/gist_id}","starred_url":"https://api.github.com/users/jonjaques/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonjaques/subscriptions","organizations_url":"https://api.github.com/users/jonjaques/orgs","repos_url":"https://api.github.com/users/jonjaques/repos","events_url":"https://api.github.com/users/jonjaques/events{/privacy}","received_events_url":"https://api.github.com/users/jonjaques/received_events","type":"User","site_admin":false},"body":"Hello, \r\n\r\nProbably should have reported this as an issue first, but I was having trouble using the attachment upload APIs along with comments.\r\n\r\nPoked around the base Client class and found that request options where being shared between the different request methods. So uploading an attachment, and then using the comment API for instance would \"poison\" the options for `requestUpload`, so subsequent requests would throw a stream exception `[Error: write after end]`.\r\n\r\nI can produce an example if necessary, but all this PR does is grab the shared options, and clone them into a local var. Problem solved!","created_at":"2015-10-19T02:16:43Z","updated_at":"2015-10-19T02:16:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/blakmatrix/node-zendesk/pulls/113/commits","review_comments_url":"https://api.github.com/repos/blakmatrix/node-zendesk/pulls/113/comments","review_comment_url":"https://api.github.com/repos/blakmatrix/node-zendesk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/blakmatrix/node-zendesk/issues/113/comments","statuses_url":"https://api.github.com/repos/blakmatrix/node-zendesk/statuses/be22f81fa47e4b07c31ff8bad5957e0703c249cb","head":{"label":"3five:fix-client-options","ref":"fix-client-options","sha":"be22f81fa47e4b07c31ff8bad5957e0703c249cb","user":{"login":"3five","id":4174646,"avatar_url":"https://avatars.githubusercontent.com/u/4174646?v=3","gravatar_id":"","url":"https://api.github.com/users/3five","html_url":"https://github.com/3five","followers_url":"https://api.github.com/users/3five/followers","following_url":"https://api.github.com/users/3five/following{/other_user}","gists_url":"https://api.github.com/users/3five/gists{/gist_id}","starred_url":"https://api.github.com/users/3five/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/3five/subscriptions","organizations_url":"https://api.github.com/users/3five/orgs","repos_url":"https://api.github.com/users/3five/repos","events_url":"https://api.github.com/users/3five/events{/privacy}","received_events_url":"https://api.github.com/users/3five/received_events","type":"Organization","site_admin":false},"repo":{"id":43916635,"name":"node-zendesk","full_name":"3five/node-zendesk","owner":{"login":"3five","id":4174646,"avatar_url":"https://avatars.githubusercontent.com/u/4174646?v=3","gravatar_id":"","url":"https://api.github.com/users/3five","html_url":"https://github.com/3five","followers_url":"https://api.github.com/users/3five/followers","following_url":"https://api.github.com/users/3five/following{/other_user}","gists_url":"https://api.github.com/users/3five/gists{/gist_id}","starred_url":"https://api.github.com/users/3five/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/3five/subscriptions","organizations_url":"https://api.github.com/users/3five/orgs","repos_url":"https://api.github.com/users/3five/repos","events_url":"https://api.github.com/users/3five/events{/privacy}","received_events_url":"https://api.github.com/users/3five/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/3five/node-zendesk","description":"a zendesk API client library for use with node.js","fork":true,"url":"https://api.github.com/repos/3five/node-zendesk","forks_url":"https://api.github.com/repos/3five/node-zendesk/forks","keys_url":"https://api.github.com/repos/3five/node-zendesk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/3five/node-zendesk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/3five/node-zendesk/teams","hooks_url":"https://api.github.com/repos/3five/node-zendesk/hooks","issue_events_url":"https://api.github.com/repos/3five/node-zendesk/issues/events{/number}","events_url":"https://api.github.com/repos/3five/node-zendesk/events","assignees_url":"https://api.github.com/repos/3five/node-zendesk/assignees{/user}","branches_url":"https://api.github.com/repos/3five/node-zendesk/branches{/branch}","tags_url":"https://api.github.com/repos/3five/node-zendesk/tags","blobs_url":"https://api.github.com/repos/3five/node-zendesk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/3five/node-zendesk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/3five/node-zendesk/git/refs{/sha}","trees_url":"https://api.github.com/repos/3five/node-zendesk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/3five/node-zendesk/statuses/{sha}","languages_url":"https://api.github.com/repos/3five/node-zendesk/languages","stargazers_url":"https://api.github.com/repos/3five/node-zendesk/stargazers","contributors_url":"https://api.github.com/repos/3five/node-zendesk/contributors","subscribers_url":"https://api.github.com/repos/3five/node-zendesk/subscribers","subscription_url":"https://api.github.com/repos/3five/node-zendesk/subscription","commits_url":"https://api.github.com/repos/3five/node-zendesk/commits{/sha}","git_commits_url":"https://api.github.com/repos/3five/node-zendesk/git/commits{/sha}","comments_url":"https://api.github.com/repos/3five/node-zendesk/comments{/number}","issue_comment_url":"https://api.github.com/repos/3five/node-zendesk/issues/comments{/number}","contents_url":"https://api.github.com/repos/3five/node-zendesk/contents/{+path}","compare_url":"https://api.github.com/repos/3five/node-zendesk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/3five/node-zendesk/merges","archive_url":"https://api.github.com/repos/3five/node-zendesk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/3five/node-zendesk/downloads","issues_url":"https://api.github.com/repos/3five/node-zendesk/issues{/number}","pulls_url":"https://api.github.com/repos/3five/node-zendesk/pulls{/number}","milestones_url":"https://api.github.com/repos/3five/node-zendesk/milestones{/number}","notifications_url":"https://api.github.com/repos/3five/node-zendesk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/3five/node-zendesk/labels{/name}","releases_url":"https://api.github.com/repos/3five/node-zendesk/releases{/id}","created_at":"2015-10-08T21:13:53Z","updated_at":"2015-10-08T21:13:55Z","pushed_at":"2015-10-19T02:04:22Z","git_url":"git://github.com/3five/node-zendesk.git","ssh_url":"git@github.com:3five/node-zendesk.git","clone_url":"https://github.com/3five/node-zendesk.git","svn_url":"https://github.com/3five/node-zendesk","homepage":null,"size":340,"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":"blakmatrix:master","ref":"master","sha":"f0aec943049c3bf61c61443e0c5fb56ff7071553","user":{"login":"blakmatrix","id":91209,"avatar_url":"https://avatars.githubusercontent.com/u/91209?v=3","gravatar_id":"","url":"https://api.github.com/users/blakmatrix","html_url":"https://github.com/blakmatrix","followers_url":"https://api.github.com/users/blakmatrix/followers","following_url":"https://api.github.com/users/blakmatrix/following{/other_user}","gists_url":"https://api.github.com/users/blakmatrix/gists{/gist_id}","starred_url":"https://api.github.com/users/blakmatrix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blakmatrix/subscriptions","organizations_url":"https://api.github.com/users/blakmatrix/orgs","repos_url":"https://api.github.com/users/blakmatrix/repos","events_url":"https://api.github.com/users/blakmatrix/events{/privacy}","received_events_url":"https://api.github.com/users/blakmatrix/received_events","type":"User","site_admin":false},"repo":{"id":4803335,"name":"node-zendesk","full_name":"blakmatrix/node-zendesk","owner":{"login":"blakmatrix","id":91209,"avatar_url":"https://avatars.githubusercontent.com/u/91209?v=3","gravatar_id":"","url":"https://api.github.com/users/blakmatrix","html_url":"https://github.com/blakmatrix","followers_url":"https://api.github.com/users/blakmatrix/followers","following_url":"https://api.github.com/users/blakmatrix/following{/other_user}","gists_url":"https://api.github.com/users/blakmatrix/gists{/gist_id}","starred_url":"https://api.github.com/users/blakmatrix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blakmatrix/subscriptions","organizations_url":"https://api.github.com/users/blakmatrix/orgs","repos_url":"https://api.github.com/users/blakmatrix/repos","events_url":"https://api.github.com/users/blakmatrix/events{/privacy}","received_events_url":"https://api.github.com/users/blakmatrix/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/blakmatrix/node-zendesk","description":"a zendesk API client library for use with node.js","fork":false,"url":"https://api.github.com/repos/blakmatrix/node-zendesk","forks_url":"https://api.github.com/repos/blakmatrix/node-zendesk/forks","keys_url":"https://api.github.com/repos/blakmatrix/node-zendesk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/blakmatrix/node-zendesk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/blakmatrix/node-zendesk/teams","hooks_url":"https://api.github.com/repos/blakmatrix/node-zendesk/hooks","issue_events_url":"https://api.github.com/repos/blakmatrix/node-zendesk/issues/events{/number}","events_url":"https://api.github.com/repos/blakmatrix/node-zendesk/events","assignees_url":"https://api.github.com/repos/blakmatrix/node-zendesk/assignees{/user}","branches_url":"https://api.github.com/repos/blakmatrix/node-zendesk/branches{/branch}","tags_url":"https://api.github.com/repos/blakmatrix/node-zendesk/tags","blobs_url":"https://api.github.com/repos/blakmatrix/node-zendesk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/blakmatrix/node-zendesk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/blakmatrix/node-zendesk/git/refs{/sha}","trees_url":"https://api.github.com/repos/blakmatrix/node-zendesk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/blakmatrix/node-zendesk/statuses/{sha}","languages_url":"https://api.github.com/repos/blakmatrix/node-zendesk/languages","stargazers_url":"https://api.github.com/repos/blakmatrix/node-zendesk/stargazers","contributors_url":"https://api.github.com/repos/blakmatrix/node-zendesk/contributors","subscribers_url":"https://api.github.com/repos/blakmatrix/node-zendesk/subscribers","subscription_url":"https://api.github.com/repos/blakmatrix/node-zendesk/subscription","commits_url":"https://api.github.com/repos/blakmatrix/node-zendesk/commits{/sha}","git_commits_url":"https://api.github.com/repos/blakmatrix/node-zendesk/git/commits{/sha}","comments_url":"https://api.github.com/repos/blakmatrix/node-zendesk/comments{/number}","issue_comment_url":"https://api.github.com/repos/blakmatrix/node-zendesk/issues/comments{/number}","contents_url":"https://api.github.com/repos/blakmatrix/node-zendesk/contents/{+path}","compare_url":"https://api.github.com/repos/blakmatrix/node-zendesk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/blakmatrix/node-zendesk/merges","archive_url":"https://api.github.com/repos/blakmatrix/node-zendesk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/blakmatrix/node-zendesk/downloads","issues_url":"https://api.github.com/repos/blakmatrix/node-zendesk/issues{/number}","pulls_url":"https://api.github.com/repos/blakmatrix/node-zendesk/pulls{/number}","milestones_url":"https://api.github.com/repos/blakmatrix/node-zendesk/milestones{/number}","notifications_url":"https://api.github.com/repos/blakmatrix/node-zendesk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/blakmatrix/node-zendesk/labels{/name}","releases_url":"https://api.github.com/repos/blakmatrix/node-zendesk/releases{/id}","created_at":"2012-06-27T02:16:27Z","updated_at":"2015-10-11T12:03:28Z","pushed_at":"2015-10-06T00:35:15Z","git_url":"git://github.com/blakmatrix/node-zendesk.git","ssh_url":"git@github.com:blakmatrix/node-zendesk.git","clone_url":"https://github.com/blakmatrix/node-zendesk.git","svn_url":"https://github.com/blakmatrix/node-zendesk","homepage":null,"size":945,"stargazers_count":81,"watchers_count":81,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":71,"mirror_url":null,"open_issues_count":15,"forks":71,"open_issues":15,"watchers":81,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/blakmatrix/node-zendesk/pulls/113"},"html":{"href":"https://github.com/blakmatrix/node-zendesk/pull/113"},"issue":{"href":"https://api.github.com/repos/blakmatrix/node-zendesk/issues/113"},"comments":{"href":"https://api.github.com/repos/blakmatrix/node-zendesk/issues/113/comments"},"review_comments":{"href":"https://api.github.com/repos/blakmatrix/node-zendesk/pulls/113/comments"},"review_comment":{"href":"https://api.github.com/repos/blakmatrix/node-zendesk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/blakmatrix/node-zendesk/pulls/113/commits"},"statuses":{"href":"https://api.github.com/repos/blakmatrix/node-zendesk/statuses/be22f81fa47e4b07c31ff8bad5957e0703c249cb"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":29,"deletions":28,"changed_files":1}}