{"action":"created","comment":{"url":"https://api.github.com/repos/holidayextras/node-saucelabs/pulls/comments/25288072","id":25288072,"diff_hunk":"@@ -268,39 +268,22 @@ function generateLink(hostname, auth, date, job) {\n }\n \n function makeRequest(options, body, callback) {\n-  var request = https.request(options, function (response) {\n-    var result = '';\n-\n-    response\n-      .on('data', function (chunk) {\n-        result += chunk;\n-      })\n-      .on('end', function () {\n-        var res;\n-\n-        try {\n-          res = JSON.parse(result);\n-        } catch (e) {\n-          callback('Could not parse response: ' + result);\n-          return;\n-        }\n-\n-        if (response.statusCode === 200) {\n-          callback(null, res);\n-        } else {\n-          callback(res);\n-        }\n-      });\n-  });\n+  request(options, function (error, response, body) {\n \n-  request\n-    .on('error', function (err) {\n-      callback('Could not send request: ' + err.message);\n-    });\n+    if(error){\n+      callback('Could not send request: ' + error.message);\n+    }\n \n-  if (body != null) {\n-    request.write(body);\n-  }\n+    if (response.statusCode === 200) {\n \n-  request.end();\n+      callback(null, body);\n+    } else {\n+      console.log(typeof(body));","path":"lib/SauceLabs.js","position":107,"original_position":107,"commit_id":"1f77c592cc4d372ebaf703721aff955d05c5812e","original_commit_id":"1f77c592cc4d372ebaf703721aff955d05c5812e","user":{"login":"danjenkins","id":243117,"avatar_url":"https://avatars.githubusercontent.com/u/243117?v=3","gravatar_id":"","url":"https://api.github.com/users/danjenkins","html_url":"https://github.com/danjenkins","followers_url":"https://api.github.com/users/danjenkins/followers","following_url":"https://api.github.com/users/danjenkins/following{/other_user}","gists_url":"https://api.github.com/users/danjenkins/gists{/gist_id}","starred_url":"https://api.github.com/users/danjenkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danjenkins/subscriptions","organizations_url":"https://api.github.com/users/danjenkins/orgs","repos_url":"https://api.github.com/users/danjenkins/repos","events_url":"https://api.github.com/users/danjenkins/events{/privacy}","received_events_url":"https://api.github.com/users/danjenkins/received_events","type":"User","site_admin":false},"body":"you've got a console.log here","created_at":"2015-02-24T20:14:50Z","updated_at":"2015-02-24T20:14:50Z","html_url":"https://github.com/holidayextras/node-saucelabs/pull/17#discussion_r25288072","pull_request_url":"https://api.github.com/repos/holidayextras/node-saucelabs/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/holidayextras/node-saucelabs/pulls/comments/25288072"},"html":{"href":"https://github.com/holidayextras/node-saucelabs/pull/17#discussion_r25288072"},"pull_request":{"href":"https://api.github.com/repos/holidayextras/node-saucelabs/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/holidayextras/node-saucelabs/pulls/17","id":29926349,"html_url":"https://github.com/holidayextras/node-saucelabs/pull/17","diff_url":"https://github.com/holidayextras/node-saucelabs/pull/17.diff","patch_url":"https://github.com/holidayextras/node-saucelabs/pull/17.patch","issue_url":"https://api.github.com/repos/holidayextras/node-saucelabs/issues/17","number":17,"state":"open","locked":false,"title":"Use request instead of http to easily enable proxy ","user":{"login":"mhamel06","id":473551,"avatar_url":"https://avatars.githubusercontent.com/u/473551?v=3","gravatar_id":"","url":"https://api.github.com/users/mhamel06","html_url":"https://github.com/mhamel06","followers_url":"https://api.github.com/users/mhamel06/followers","following_url":"https://api.github.com/users/mhamel06/following{/other_user}","gists_url":"https://api.github.com/users/mhamel06/gists{/gist_id}","starred_url":"https://api.github.com/users/mhamel06/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhamel06/subscriptions","organizations_url":"https://api.github.com/users/mhamel06/orgs","repos_url":"https://api.github.com/users/mhamel06/repos","events_url":"https://api.github.com/users/mhamel06/events{/privacy}","received_events_url":"https://api.github.com/users/mhamel06/received_events","type":"User","site_admin":false},"body":"resolves #16","created_at":"2015-02-24T19:12:41Z","updated_at":"2015-02-24T20:14:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"21558d00755f38fee81d472c8bbfb2ee3ff33c22","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/holidayextras/node-saucelabs/pulls/17/commits","review_comments_url":"https://api.github.com/repos/holidayextras/node-saucelabs/pulls/17/comments","review_comment_url":"https://api.github.com/repos/holidayextras/node-saucelabs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/holidayextras/node-saucelabs/issues/17/comments","statuses_url":"https://api.github.com/repos/holidayextras/node-saucelabs/statuses/1f77c592cc4d372ebaf703721aff955d05c5812e","head":{"label":"mhamel06:master","ref":"master","sha":"1f77c592cc4d372ebaf703721aff955d05c5812e","user":{"login":"mhamel06","id":473551,"avatar_url":"https://avatars.githubusercontent.com/u/473551?v=3","gravatar_id":"","url":"https://api.github.com/users/mhamel06","html_url":"https://github.com/mhamel06","followers_url":"https://api.github.com/users/mhamel06/followers","following_url":"https://api.github.com/users/mhamel06/following{/other_user}","gists_url":"https://api.github.com/users/mhamel06/gists{/gist_id}","starred_url":"https://api.github.com/users/mhamel06/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhamel06/subscriptions","organizations_url":"https://api.github.com/users/mhamel06/orgs","repos_url":"https://api.github.com/users/mhamel06/repos","events_url":"https://api.github.com/users/mhamel06/events{/privacy}","received_events_url":"https://api.github.com/users/mhamel06/received_events","type":"User","site_admin":false},"repo":{"id":31025559,"name":"node-saucelabs","full_name":"mhamel06/node-saucelabs","owner":{"login":"mhamel06","id":473551,"avatar_url":"https://avatars.githubusercontent.com/u/473551?v=3","gravatar_id":"","url":"https://api.github.com/users/mhamel06","html_url":"https://github.com/mhamel06","followers_url":"https://api.github.com/users/mhamel06/followers","following_url":"https://api.github.com/users/mhamel06/following{/other_user}","gists_url":"https://api.github.com/users/mhamel06/gists{/gist_id}","starred_url":"https://api.github.com/users/mhamel06/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhamel06/subscriptions","organizations_url":"https://api.github.com/users/mhamel06/orgs","repos_url":"https://api.github.com/users/mhamel06/repos","events_url":"https://api.github.com/users/mhamel06/events{/privacy}","received_events_url":"https://api.github.com/users/mhamel06/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mhamel06/node-saucelabs","description":"A wrapper around saucelabs API","fork":true,"url":"https://api.github.com/repos/mhamel06/node-saucelabs","forks_url":"https://api.github.com/repos/mhamel06/node-saucelabs/forks","keys_url":"https://api.github.com/repos/mhamel06/node-saucelabs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mhamel06/node-saucelabs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mhamel06/node-saucelabs/teams","hooks_url":"https://api.github.com/repos/mhamel06/node-saucelabs/hooks","issue_events_url":"https://api.github.com/repos/mhamel06/node-saucelabs/issues/events{/number}","events_url":"https://api.github.com/repos/mhamel06/node-saucelabs/events","assignees_url":"https://api.github.com/repos/mhamel06/node-saucelabs/assignees{/user}","branches_url":"https://api.github.com/repos/mhamel06/node-saucelabs/branches{/branch}","tags_url":"https://api.github.com/repos/mhamel06/node-saucelabs/tags","blobs_url":"https://api.github.com/repos/mhamel06/node-saucelabs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mhamel06/node-saucelabs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mhamel06/node-saucelabs/git/refs{/sha}","trees_url":"https://api.github.com/repos/mhamel06/node-saucelabs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mhamel06/node-saucelabs/statuses/{sha}","languages_url":"https://api.github.com/repos/mhamel06/node-saucelabs/languages","stargazers_url":"https://api.github.com/repos/mhamel06/node-saucelabs/stargazers","contributors_url":"https://api.github.com/repos/mhamel06/node-saucelabs/contributors","subscribers_url":"https://api.github.com/repos/mhamel06/node-saucelabs/subscribers","subscription_url":"https://api.github.com/repos/mhamel06/node-saucelabs/subscription","commits_url":"https://api.github.com/repos/mhamel06/node-saucelabs/commits{/sha}","git_commits_url":"https://api.github.com/repos/mhamel06/node-saucelabs/git/commits{/sha}","comments_url":"https://api.github.com/repos/mhamel06/node-saucelabs/comments{/number}","issue_comment_url":"https://api.github.com/repos/mhamel06/node-saucelabs/issues/comments{/number}","contents_url":"https://api.github.com/repos/mhamel06/node-saucelabs/contents/{+path}","compare_url":"https://api.github.com/repos/mhamel06/node-saucelabs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mhamel06/node-saucelabs/merges","archive_url":"https://api.github.com/repos/mhamel06/node-saucelabs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mhamel06/node-saucelabs/downloads","issues_url":"https://api.github.com/repos/mhamel06/node-saucelabs/issues{/number}","pulls_url":"https://api.github.com/repos/mhamel06/node-saucelabs/pulls{/number}","milestones_url":"https://api.github.com/repos/mhamel06/node-saucelabs/milestones{/number}","notifications_url":"https://api.github.com/repos/mhamel06/node-saucelabs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mhamel06/node-saucelabs/labels{/name}","releases_url":"https://api.github.com/repos/mhamel06/node-saucelabs/releases{/id}","created_at":"2015-02-19T16:51:09Z","updated_at":"2015-02-24T19:11:56Z","pushed_at":"2015-02-24T19:11:56Z","git_url":"git://github.com/mhamel06/node-saucelabs.git","ssh_url":"git@github.com:mhamel06/node-saucelabs.git","clone_url":"https://github.com/mhamel06/node-saucelabs.git","svn_url":"https://github.com/mhamel06/node-saucelabs","homepage":null,"size":119,"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":"holidayextras:master","ref":"master","sha":"f0c9d4d6b8850021b7c590e5aa0756b9bc55d6f0","user":{"login":"holidayextras","id":286993,"avatar_url":"https://avatars.githubusercontent.com/u/286993?v=3","gravatar_id":"","url":"https://api.github.com/users/holidayextras","html_url":"https://github.com/holidayextras","followers_url":"https://api.github.com/users/holidayextras/followers","following_url":"https://api.github.com/users/holidayextras/following{/other_user}","gists_url":"https://api.github.com/users/holidayextras/gists{/gist_id}","starred_url":"https://api.github.com/users/holidayextras/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/holidayextras/subscriptions","organizations_url":"https://api.github.com/users/holidayextras/orgs","repos_url":"https://api.github.com/users/holidayextras/repos","events_url":"https://api.github.com/users/holidayextras/events{/privacy}","received_events_url":"https://api.github.com/users/holidayextras/received_events","type":"Organization","site_admin":false},"repo":{"id":4519039,"name":"node-saucelabs","full_name":"holidayextras/node-saucelabs","owner":{"login":"holidayextras","id":286993,"avatar_url":"https://avatars.githubusercontent.com/u/286993?v=3","gravatar_id":"","url":"https://api.github.com/users/holidayextras","html_url":"https://github.com/holidayextras","followers_url":"https://api.github.com/users/holidayextras/followers","following_url":"https://api.github.com/users/holidayextras/following{/other_user}","gists_url":"https://api.github.com/users/holidayextras/gists{/gist_id}","starred_url":"https://api.github.com/users/holidayextras/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/holidayextras/subscriptions","organizations_url":"https://api.github.com/users/holidayextras/orgs","repos_url":"https://api.github.com/users/holidayextras/repos","events_url":"https://api.github.com/users/holidayextras/events{/privacy}","received_events_url":"https://api.github.com/users/holidayextras/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/holidayextras/node-saucelabs","description":"A wrapper around saucelabs API","fork":false,"url":"https://api.github.com/repos/holidayextras/node-saucelabs","forks_url":"https://api.github.com/repos/holidayextras/node-saucelabs/forks","keys_url":"https://api.github.com/repos/holidayextras/node-saucelabs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/holidayextras/node-saucelabs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/holidayextras/node-saucelabs/teams","hooks_url":"https://api.github.com/repos/holidayextras/node-saucelabs/hooks","issue_events_url":"https://api.github.com/repos/holidayextras/node-saucelabs/issues/events{/number}","events_url":"https://api.github.com/repos/holidayextras/node-saucelabs/events","assignees_url":"https://api.github.com/repos/holidayextras/node-saucelabs/assignees{/user}","branches_url":"https://api.github.com/repos/holidayextras/node-saucelabs/branches{/branch}","tags_url":"https://api.github.com/repos/holidayextras/node-saucelabs/tags","blobs_url":"https://api.github.com/repos/holidayextras/node-saucelabs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/holidayextras/node-saucelabs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/holidayextras/node-saucelabs/git/refs{/sha}","trees_url":"https://api.github.com/repos/holidayextras/node-saucelabs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/holidayextras/node-saucelabs/statuses/{sha}","languages_url":"https://api.github.com/repos/holidayextras/node-saucelabs/languages","stargazers_url":"https://api.github.com/repos/holidayextras/node-saucelabs/stargazers","contributors_url":"https://api.github.com/repos/holidayextras/node-saucelabs/contributors","subscribers_url":"https://api.github.com/repos/holidayextras/node-saucelabs/subscribers","subscription_url":"https://api.github.com/repos/holidayextras/node-saucelabs/subscription","commits_url":"https://api.github.com/repos/holidayextras/node-saucelabs/commits{/sha}","git_commits_url":"https://api.github.com/repos/holidayextras/node-saucelabs/git/commits{/sha}","comments_url":"https://api.github.com/repos/holidayextras/node-saucelabs/comments{/number}","issue_comment_url":"https://api.github.com/repos/holidayextras/node-saucelabs/issues/comments{/number}","contents_url":"https://api.github.com/repos/holidayextras/node-saucelabs/contents/{+path}","compare_url":"https://api.github.com/repos/holidayextras/node-saucelabs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/holidayextras/node-saucelabs/merges","archive_url":"https://api.github.com/repos/holidayextras/node-saucelabs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/holidayextras/node-saucelabs/downloads","issues_url":"https://api.github.com/repos/holidayextras/node-saucelabs/issues{/number}","pulls_url":"https://api.github.com/repos/holidayextras/node-saucelabs/pulls{/number}","milestones_url":"https://api.github.com/repos/holidayextras/node-saucelabs/milestones{/number}","notifications_url":"https://api.github.com/repos/holidayextras/node-saucelabs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/holidayextras/node-saucelabs/labels{/name}","releases_url":"https://api.github.com/repos/holidayextras/node-saucelabs/releases{/id}","created_at":"2012-06-01T11:43:00Z","updated_at":"2015-02-16T17:30:53Z","pushed_at":"2014-07-08T14:43:13Z","git_url":"git://github.com/holidayextras/node-saucelabs.git","ssh_url":"git@github.com:holidayextras/node-saucelabs.git","clone_url":"https://github.com/holidayextras/node-saucelabs.git","svn_url":"https://github.com/holidayextras/node-saucelabs","homepage":null,"size":227,"stargazers_count":32,"watchers_count":32,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":4,"forks":11,"open_issues":4,"watchers":32,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/holidayextras/node-saucelabs/pulls/17"},"html":{"href":"https://github.com/holidayextras/node-saucelabs/pull/17"},"issue":{"href":"https://api.github.com/repos/holidayextras/node-saucelabs/issues/17"},"comments":{"href":"https://api.github.com/repos/holidayextras/node-saucelabs/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/holidayextras/node-saucelabs/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/holidayextras/node-saucelabs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/holidayextras/node-saucelabs/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/holidayextras/node-saucelabs/statuses/1f77c592cc4d372ebaf703721aff955d05c5812e"}}}}