{"action":"created","comment":{"url":"https://api.github.com/repos/hapijs/bell/pulls/comments/31241537","id":31241537,"diff_hunk":"@@ -354,32 +344,50 @@ internals.Client.prototype._prepare = function (method, uri, params, oauth, opti\n     oauth.oauth_signature_method = 'HMAC-SHA1';\n     oauth.oauth_signature = this.signature(method, uri, params, oauth, options.secret);\n \n-    var query = params ? ('?' + Querystring.encode(params)) : '';\n-    return next(method, uri + query, internals.Client.header(oauth));\n-};\n+    if (this.settings.version) {\n+        oauth.oauth_version = this.settings.version;\n+    }\n \n+    // Calculate OAuth header\n \n-internals.Client.prototype.request = function (method, uri, params, oauth, tokenSecret, type, callback) {\n+    var requestOptions = {\n+        headers: {\n+            Authorization: internals.Client.header(oauth)\n+        }\n+    };\n \n-    var desc = this.provider + ' ' + type;\n+    if (params) {\n+        var paramsString = internals.queryString(params);\n+        if (method === 'get') {\n+            uri += '?' + paramsString;\n+        }\n+        else {\n+            requestOptions.payload = paramsString;\n+            requestOptions.headers['content-type'] = 'application/x-www-form-urlencoded';\n+        }\n+    }\n \n-    this._prepare(method, uri, params, oauth, { secret: tokenSecret }, function (method, uri, header) {\n+    if (options.stream) {\n+        return Wreck.request(method, uri, requestOptions, callback);\n+    }\n \n-        Wreck[method.toLowerCase()](uri, { headers: { Authorization: header } }, function (err, res, payload) {\n+    var desc = (options.desc || 'resource');","path":"lib/oauth.js","position":144,"original_position":144,"commit_id":"49ee8deee28857deed188d2e8a318fb9299f5b65","original_commit_id":"49ee8deee28857deed188d2e8a318fb9299f5b65","user":{"login":"cjihrig","id":2512748,"avatar_url":"https://avatars.githubusercontent.com/u/2512748?v=3","gravatar_id":"","url":"https://api.github.com/users/cjihrig","html_url":"https://github.com/cjihrig","followers_url":"https://api.github.com/users/cjihrig/followers","following_url":"https://api.github.com/users/cjihrig/following{/other_user}","gists_url":"https://api.github.com/users/cjihrig/gists{/gist_id}","starred_url":"https://api.github.com/users/cjihrig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjihrig/subscriptions","organizations_url":"https://api.github.com/users/cjihrig/orgs","repos_url":"https://api.github.com/users/cjihrig/repos","events_url":"https://api.github.com/users/cjihrig/events{/privacy}","received_events_url":"https://api.github.com/users/cjihrig/received_events","type":"User","site_admin":false},"body":"The parens aren't needed.","created_at":"2015-05-28T14:55:11Z","updated_at":"2015-05-28T14:55:11Z","html_url":"https://github.com/hapijs/bell/pull/94#discussion_r31241537","pull_request_url":"https://api.github.com/repos/hapijs/bell/pulls/94","_links":{"self":{"href":"https://api.github.com/repos/hapijs/bell/pulls/comments/31241537"},"html":{"href":"https://github.com/hapijs/bell/pull/94#discussion_r31241537"},"pull_request":{"href":"https://api.github.com/repos/hapijs/bell/pulls/94"}}},"pull_request":{"url":"https://api.github.com/repos/hapijs/bell/pulls/94","id":36356841,"html_url":"https://github.com/hapijs/bell/pull/94","diff_url":"https://github.com/hapijs/bell/pull/94.diff","patch_url":"https://github.com/hapijs/bell/pull/94.patch","issue_url":"https://api.github.com/repos/hapijs/bell/issues/94","number":94,"state":"open","locked":false,"title":"Rewrite OAuth 1.0 client interface","user":{"login":"hueniverse","id":56631,"avatar_url":"https://avatars.githubusercontent.com/u/56631?v=3","gravatar_id":"","url":"https://api.github.com/users/hueniverse","html_url":"https://github.com/hueniverse","followers_url":"https://api.github.com/users/hueniverse/followers","following_url":"https://api.github.com/users/hueniverse/following{/other_user}","gists_url":"https://api.github.com/users/hueniverse/gists{/gist_id}","starred_url":"https://api.github.com/users/hueniverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hueniverse/subscriptions","organizations_url":"https://api.github.com/users/hueniverse/orgs","repos_url":"https://api.github.com/users/hueniverse/repos","events_url":"https://api.github.com/users/hueniverse/events{/privacy}","received_events_url":"https://api.github.com/users/hueniverse/received_events","type":"User","site_admin":false},"body":"Closes #92 ","created_at":"2015-05-27T22:48:49Z","updated_at":"2015-05-28T14:55:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e161dec8e6b3f20b663857d45cf9bfeda0946628","assignee":{"login":"geek","id":441346,"avatar_url":"https://avatars.githubusercontent.com/u/441346?v=3","gravatar_id":"","url":"https://api.github.com/users/geek","html_url":"https://github.com/geek","followers_url":"https://api.github.com/users/geek/followers","following_url":"https://api.github.com/users/geek/following{/other_user}","gists_url":"https://api.github.com/users/geek/gists{/gist_id}","starred_url":"https://api.github.com/users/geek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geek/subscriptions","organizations_url":"https://api.github.com/users/geek/orgs","repos_url":"https://api.github.com/users/geek/repos","events_url":"https://api.github.com/users/geek/events{/privacy}","received_events_url":"https://api.github.com/users/geek/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/hapijs/bell/milestones/18","html_url":"https://github.com/hapijs/bell/milestones/3.0.0","labels_url":"https://api.github.com/repos/hapijs/bell/milestones/18/labels","id":1136837,"number":18,"title":"3.0.0","description":"","creator":{"login":"geek","id":441346,"avatar_url":"https://avatars.githubusercontent.com/u/441346?v=3","gravatar_id":"","url":"https://api.github.com/users/geek","html_url":"https://github.com/geek","followers_url":"https://api.github.com/users/geek/followers","following_url":"https://api.github.com/users/geek/following{/other_user}","gists_url":"https://api.github.com/users/geek/gists{/gist_id}","starred_url":"https://api.github.com/users/geek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geek/subscriptions","organizations_url":"https://api.github.com/users/geek/orgs","repos_url":"https://api.github.com/users/geek/repos","events_url":"https://api.github.com/users/geek/events{/privacy}","received_events_url":"https://api.github.com/users/geek/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":0,"state":"open","created_at":"2015-05-27T20:48:39Z","updated_at":"2015-05-27T22:49:58Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/hapijs/bell/pulls/94/commits","review_comments_url":"https://api.github.com/repos/hapijs/bell/pulls/94/comments","review_comment_url":"https://api.github.com/repos/hapijs/bell/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hapijs/bell/issues/94/comments","statuses_url":"https://api.github.com/repos/hapijs/bell/statuses/49ee8deee28857deed188d2e8a318fb9299f5b65","head":{"label":"hapijs:client","ref":"client","sha":"49ee8deee28857deed188d2e8a318fb9299f5b65","user":{"login":"hapijs","id":3774533,"avatar_url":"https://avatars.githubusercontent.com/u/3774533?v=3","gravatar_id":"","url":"https://api.github.com/users/hapijs","html_url":"https://github.com/hapijs","followers_url":"https://api.github.com/users/hapijs/followers","following_url":"https://api.github.com/users/hapijs/following{/other_user}","gists_url":"https://api.github.com/users/hapijs/gists{/gist_id}","starred_url":"https://api.github.com/users/hapijs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hapijs/subscriptions","organizations_url":"https://api.github.com/users/hapijs/orgs","repos_url":"https://api.github.com/users/hapijs/repos","events_url":"https://api.github.com/users/hapijs/events{/privacy}","received_events_url":"https://api.github.com/users/hapijs/received_events","type":"Organization","site_admin":false},"repo":{"id":20395079,"name":"bell","full_name":"hapijs/bell","owner":{"login":"hapijs","id":3774533,"avatar_url":"https://avatars.githubusercontent.com/u/3774533?v=3","gravatar_id":"","url":"https://api.github.com/users/hapijs","html_url":"https://github.com/hapijs","followers_url":"https://api.github.com/users/hapijs/followers","following_url":"https://api.github.com/users/hapijs/following{/other_user}","gists_url":"https://api.github.com/users/hapijs/gists{/gist_id}","starred_url":"https://api.github.com/users/hapijs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hapijs/subscriptions","organizations_url":"https://api.github.com/users/hapijs/orgs","repos_url":"https://api.github.com/users/hapijs/repos","events_url":"https://api.github.com/users/hapijs/events{/privacy}","received_events_url":"https://api.github.com/users/hapijs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hapijs/bell","description":"Third-party login plugin for hapi","fork":false,"url":"https://api.github.com/repos/hapijs/bell","forks_url":"https://api.github.com/repos/hapijs/bell/forks","keys_url":"https://api.github.com/repos/hapijs/bell/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hapijs/bell/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hapijs/bell/teams","hooks_url":"https://api.github.com/repos/hapijs/bell/hooks","issue_events_url":"https://api.github.com/repos/hapijs/bell/issues/events{/number}","events_url":"https://api.github.com/repos/hapijs/bell/events","assignees_url":"https://api.github.com/repos/hapijs/bell/assignees{/user}","branches_url":"https://api.github.com/repos/hapijs/bell/branches{/branch}","tags_url":"https://api.github.com/repos/hapijs/bell/tags","blobs_url":"https://api.github.com/repos/hapijs/bell/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hapijs/bell/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hapijs/bell/git/refs{/sha}","trees_url":"https://api.github.com/repos/hapijs/bell/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hapijs/bell/statuses/{sha}","languages_url":"https://api.github.com/repos/hapijs/bell/languages","stargazers_url":"https://api.github.com/repos/hapijs/bell/stargazers","contributors_url":"https://api.github.com/repos/hapijs/bell/contributors","subscribers_url":"https://api.github.com/repos/hapijs/bell/subscribers","subscription_url":"https://api.github.com/repos/hapijs/bell/subscription","commits_url":"https://api.github.com/repos/hapijs/bell/commits{/sha}","git_commits_url":"https://api.github.com/repos/hapijs/bell/git/commits{/sha}","comments_url":"https://api.github.com/repos/hapijs/bell/comments{/number}","issue_comment_url":"https://api.github.com/repos/hapijs/bell/issues/comments{/number}","contents_url":"https://api.github.com/repos/hapijs/bell/contents/{+path}","compare_url":"https://api.github.com/repos/hapijs/bell/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hapijs/bell/merges","archive_url":"https://api.github.com/repos/hapijs/bell/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hapijs/bell/downloads","issues_url":"https://api.github.com/repos/hapijs/bell/issues{/number}","pulls_url":"https://api.github.com/repos/hapijs/bell/pulls{/number}","milestones_url":"https://api.github.com/repos/hapijs/bell/milestones{/number}","notifications_url":"https://api.github.com/repos/hapijs/bell/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hapijs/bell/labels{/name}","releases_url":"https://api.github.com/repos/hapijs/bell/releases{/id}","created_at":"2014-06-02T06:34:28Z","updated_at":"2015-05-24T06:12:00Z","pushed_at":"2015-05-27T22:58:05Z","git_url":"git://github.com/hapijs/bell.git","ssh_url":"git@github.com:hapijs/bell.git","clone_url":"https://github.com/hapijs/bell.git","svn_url":"https://github.com/hapijs/bell","homepage":null,"size":1199,"stargazers_count":177,"watchers_count":177,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":56,"mirror_url":null,"open_issues_count":12,"forks":56,"open_issues":12,"watchers":177,"default_branch":"master"}},"base":{"label":"hapijs:master","ref":"master","sha":"4b5650e78e0535c3c98153bde4ab95d0bc683c02","user":{"login":"hapijs","id":3774533,"avatar_url":"https://avatars.githubusercontent.com/u/3774533?v=3","gravatar_id":"","url":"https://api.github.com/users/hapijs","html_url":"https://github.com/hapijs","followers_url":"https://api.github.com/users/hapijs/followers","following_url":"https://api.github.com/users/hapijs/following{/other_user}","gists_url":"https://api.github.com/users/hapijs/gists{/gist_id}","starred_url":"https://api.github.com/users/hapijs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hapijs/subscriptions","organizations_url":"https://api.github.com/users/hapijs/orgs","repos_url":"https://api.github.com/users/hapijs/repos","events_url":"https://api.github.com/users/hapijs/events{/privacy}","received_events_url":"https://api.github.com/users/hapijs/received_events","type":"Organization","site_admin":false},"repo":{"id":20395079,"name":"bell","full_name":"hapijs/bell","owner":{"login":"hapijs","id":3774533,"avatar_url":"https://avatars.githubusercontent.com/u/3774533?v=3","gravatar_id":"","url":"https://api.github.com/users/hapijs","html_url":"https://github.com/hapijs","followers_url":"https://api.github.com/users/hapijs/followers","following_url":"https://api.github.com/users/hapijs/following{/other_user}","gists_url":"https://api.github.com/users/hapijs/gists{/gist_id}","starred_url":"https://api.github.com/users/hapijs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hapijs/subscriptions","organizations_url":"https://api.github.com/users/hapijs/orgs","repos_url":"https://api.github.com/users/hapijs/repos","events_url":"https://api.github.com/users/hapijs/events{/privacy}","received_events_url":"https://api.github.com/users/hapijs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hapijs/bell","description":"Third-party login plugin for hapi","fork":false,"url":"https://api.github.com/repos/hapijs/bell","forks_url":"https://api.github.com/repos/hapijs/bell/forks","keys_url":"https://api.github.com/repos/hapijs/bell/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hapijs/bell/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hapijs/bell/teams","hooks_url":"https://api.github.com/repos/hapijs/bell/hooks","issue_events_url":"https://api.github.com/repos/hapijs/bell/issues/events{/number}","events_url":"https://api.github.com/repos/hapijs/bell/events","assignees_url":"https://api.github.com/repos/hapijs/bell/assignees{/user}","branches_url":"https://api.github.com/repos/hapijs/bell/branches{/branch}","tags_url":"https://api.github.com/repos/hapijs/bell/tags","blobs_url":"https://api.github.com/repos/hapijs/bell/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hapijs/bell/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hapijs/bell/git/refs{/sha}","trees_url":"https://api.github.com/repos/hapijs/bell/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hapijs/bell/statuses/{sha}","languages_url":"https://api.github.com/repos/hapijs/bell/languages","stargazers_url":"https://api.github.com/repos/hapijs/bell/stargazers","contributors_url":"https://api.github.com/repos/hapijs/bell/contributors","subscribers_url":"https://api.github.com/repos/hapijs/bell/subscribers","subscription_url":"https://api.github.com/repos/hapijs/bell/subscription","commits_url":"https://api.github.com/repos/hapijs/bell/commits{/sha}","git_commits_url":"https://api.github.com/repos/hapijs/bell/git/commits{/sha}","comments_url":"https://api.github.com/repos/hapijs/bell/comments{/number}","issue_comment_url":"https://api.github.com/repos/hapijs/bell/issues/comments{/number}","contents_url":"https://api.github.com/repos/hapijs/bell/contents/{+path}","compare_url":"https://api.github.com/repos/hapijs/bell/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hapijs/bell/merges","archive_url":"https://api.github.com/repos/hapijs/bell/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hapijs/bell/downloads","issues_url":"https://api.github.com/repos/hapijs/bell/issues{/number}","pulls_url":"https://api.github.com/repos/hapijs/bell/pulls{/number}","milestones_url":"https://api.github.com/repos/hapijs/bell/milestones{/number}","notifications_url":"https://api.github.com/repos/hapijs/bell/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hapijs/bell/labels{/name}","releases_url":"https://api.github.com/repos/hapijs/bell/releases{/id}","created_at":"2014-06-02T06:34:28Z","updated_at":"2015-05-24T06:12:00Z","pushed_at":"2015-05-27T22:58:05Z","git_url":"git://github.com/hapijs/bell.git","ssh_url":"git@github.com:hapijs/bell.git","clone_url":"https://github.com/hapijs/bell.git","svn_url":"https://github.com/hapijs/bell","homepage":null,"size":1199,"stargazers_count":177,"watchers_count":177,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":56,"mirror_url":null,"open_issues_count":12,"forks":56,"open_issues":12,"watchers":177,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hapijs/bell/pulls/94"},"html":{"href":"https://github.com/hapijs/bell/pull/94"},"issue":{"href":"https://api.github.com/repos/hapijs/bell/issues/94"},"comments":{"href":"https://api.github.com/repos/hapijs/bell/issues/94/comments"},"review_comments":{"href":"https://api.github.com/repos/hapijs/bell/pulls/94/comments"},"review_comment":{"href":"https://api.github.com/repos/hapijs/bell/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hapijs/bell/pulls/94/commits"},"statuses":{"href":"https://api.github.com/repos/hapijs/bell/statuses/49ee8deee28857deed188d2e8a318fb9299f5b65"}}}}