{"action":"created","comment":{"url":"https://api.github.com/repos/mulesoft/js-client-oauth2/pulls/comments/79899631","id":79899631,"diff_hunk":"@@ -0,0 +1,34 @@\n+/**\n+ * Make a request using `XMLHttpRequest`.\n+ *\n+ * @param   {Promise} Promise\n+ * @param   {String}  method\n+ * @param   {String}  url\n+ * @param   {String}  body\n+ * @param   {Object}  headers\n+ * @returns {Promise}\n+ */\n+module.exports = function request (Promise, method, url, body, headers) {\n+  return new Promise(function (resolve, reject) {\n+    var xhr = new window.XMLHttpRequest()\n+\n+    xhr.open(method, url)\n+\n+    xhr.onload = function () {\n+      return resolve({\n+        status: xhr.status,\n+        body: xhr.responseText","path":"src/request/browser.js","position":20,"original_position":20,"commit_id":"2dde116ecad7fb38d72f960203fe9f8bec860b29","original_commit_id":"2dde116ecad7fb38d72f960203fe9f8bec860b29","user":{"login":"blakeembrey","id":1088987,"avatar_url":"https://avatars.githubusercontent.com/u/1088987?v=3","gravatar_id":"","url":"https://api.github.com/users/blakeembrey","html_url":"https://github.com/blakeembrey","followers_url":"https://api.github.com/users/blakeembrey/followers","following_url":"https://api.github.com/users/blakeembrey/following{/other_user}","gists_url":"https://api.github.com/users/blakeembrey/gists{/gist_id}","starred_url":"https://api.github.com/users/blakeembrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blakeembrey/subscriptions","organizations_url":"https://api.github.com/users/blakeembrey/orgs","repos_url":"https://api.github.com/users/blakeembrey/repos","events_url":"https://api.github.com/users/blakeembrey/events{/privacy}","received_events_url":"https://api.github.com/users/blakeembrey/received_events","type":"User","site_admin":false},"body":"I just killed the headers two minutes ago. I don't need them. I mentioned this in my previous comments.","created_at":"2016-09-21T18:22:18Z","updated_at":"2016-09-21T18:22:18Z","html_url":"https://github.com/mulesoft/js-client-oauth2/pull/29#discussion_r79899631","pull_request_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/pulls/29","_links":{"self":{"href":"https://api.github.com/repos/mulesoft/js-client-oauth2/pulls/comments/79899631"},"html":{"href":"https://github.com/mulesoft/js-client-oauth2/pull/29#discussion_r79899631"},"pull_request":{"href":"https://api.github.com/repos/mulesoft/js-client-oauth2/pulls/29"}}},"pull_request":{"url":"https://api.github.com/repos/mulesoft/js-client-oauth2/pulls/29","id":86072500,"html_url":"https://github.com/mulesoft/js-client-oauth2/pull/29","diff_url":"https://github.com/mulesoft/js-client-oauth2/pull/29.diff","patch_url":"https://github.com/mulesoft/js-client-oauth2/pull/29.patch","issue_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/issues/29","number":29,"state":"open","locked":false,"title":"Replace `popsicle` with an inlined request handler","user":{"login":"blakeembrey","id":1088987,"avatar_url":"https://avatars.githubusercontent.com/u/1088987?v=3","gravatar_id":"","url":"https://api.github.com/users/blakeembrey","html_url":"https://github.com/blakeembrey","followers_url":"https://api.github.com/users/blakeembrey/followers","following_url":"https://api.github.com/users/blakeembrey/following{/other_user}","gists_url":"https://api.github.com/users/blakeembrey/gists{/gist_id}","starred_url":"https://api.github.com/users/blakeembrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blakeembrey/subscriptions","organizations_url":"https://api.github.com/users/blakeembrey/orgs","repos_url":"https://api.github.com/users/blakeembrey/repos","events_url":"https://api.github.com/users/blakeembrey/events{/privacy}","received_events_url":"https://api.github.com/users/blakeembrey/received_events","type":"User","site_admin":false},"body":"Look at `request/{index.js,browser.js}`. Each are < 60 LOC, but provide everything this library would require. The only oddity here is redirect handling under node, so I might need to correct that.\r\n\r\nEdit: Also need to add tests for the request handler, which means bringing in a server for tests.","created_at":"2016-09-20T23:10:09Z","updated_at":"2016-09-21T18:22:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"75f0f6e7938c662e090fd89b100aa61f2c997880","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/pulls/29/commits","review_comments_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/pulls/29/comments","review_comment_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/issues/29/comments","statuses_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/statuses/2dde116ecad7fb38d72f960203fe9f8bec860b29","head":{"label":"mulesoft:inline-request","ref":"inline-request","sha":"2dde116ecad7fb38d72f960203fe9f8bec860b29","user":{"login":"mulesoft","id":185740,"avatar_url":"https://avatars.githubusercontent.com/u/185740?v=3","gravatar_id":"","url":"https://api.github.com/users/mulesoft","html_url":"https://github.com/mulesoft","followers_url":"https://api.github.com/users/mulesoft/followers","following_url":"https://api.github.com/users/mulesoft/following{/other_user}","gists_url":"https://api.github.com/users/mulesoft/gists{/gist_id}","starred_url":"https://api.github.com/users/mulesoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mulesoft/subscriptions","organizations_url":"https://api.github.com/users/mulesoft/orgs","repos_url":"https://api.github.com/users/mulesoft/repos","events_url":"https://api.github.com/users/mulesoft/events{/privacy}","received_events_url":"https://api.github.com/users/mulesoft/received_events","type":"Organization","site_admin":false},"repo":{"id":24748121,"name":"js-client-oauth2","full_name":"mulesoft/js-client-oauth2","owner":{"login":"mulesoft","id":185740,"avatar_url":"https://avatars.githubusercontent.com/u/185740?v=3","gravatar_id":"","url":"https://api.github.com/users/mulesoft","html_url":"https://github.com/mulesoft","followers_url":"https://api.github.com/users/mulesoft/followers","following_url":"https://api.github.com/users/mulesoft/following{/other_user}","gists_url":"https://api.github.com/users/mulesoft/gists{/gist_id}","starred_url":"https://api.github.com/users/mulesoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mulesoft/subscriptions","organizations_url":"https://api.github.com/users/mulesoft/orgs","repos_url":"https://api.github.com/users/mulesoft/repos","events_url":"https://api.github.com/users/mulesoft/events{/privacy}","received_events_url":"https://api.github.com/users/mulesoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mulesoft/js-client-oauth2","description":"A JavaScript implementation of an oauth2 client, for inclusion in the JavaScript client generator for APIs described with RAML.","fork":false,"url":"https://api.github.com/repos/mulesoft/js-client-oauth2","forks_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/forks","keys_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/teams","hooks_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/hooks","issue_events_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/issues/events{/number}","events_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/events","assignees_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/assignees{/user}","branches_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/branches{/branch}","tags_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/tags","blobs_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/git/refs{/sha}","trees_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/statuses/{sha}","languages_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/languages","stargazers_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/stargazers","contributors_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/contributors","subscribers_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/subscribers","subscription_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/subscription","commits_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/commits{/sha}","git_commits_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/git/commits{/sha}","comments_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/comments{/number}","issue_comment_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/issues/comments{/number}","contents_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/contents/{+path}","compare_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/merges","archive_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/downloads","issues_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/issues{/number}","pulls_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/pulls{/number}","milestones_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/milestones{/number}","notifications_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/labels{/name}","releases_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/releases{/id}","deployments_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/deployments","created_at":"2014-10-03T05:45:33Z","updated_at":"2016-09-13T17:16:52Z","pushed_at":"2016-09-21T18:12:07Z","git_url":"git://github.com/mulesoft/js-client-oauth2.git","ssh_url":"git@github.com:mulesoft/js-client-oauth2.git","clone_url":"https://github.com/mulesoft/js-client-oauth2.git","svn_url":"https://github.com/mulesoft/js-client-oauth2","homepage":null,"size":163,"stargazers_count":75,"watchers_count":75,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":27,"mirror_url":null,"open_issues_count":4,"forks":27,"open_issues":4,"watchers":75,"default_branch":"master"}},"base":{"label":"mulesoft:master","ref":"master","sha":"f0086b5ec013d2587589a0d86ebdd859b5c11615","user":{"login":"mulesoft","id":185740,"avatar_url":"https://avatars.githubusercontent.com/u/185740?v=3","gravatar_id":"","url":"https://api.github.com/users/mulesoft","html_url":"https://github.com/mulesoft","followers_url":"https://api.github.com/users/mulesoft/followers","following_url":"https://api.github.com/users/mulesoft/following{/other_user}","gists_url":"https://api.github.com/users/mulesoft/gists{/gist_id}","starred_url":"https://api.github.com/users/mulesoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mulesoft/subscriptions","organizations_url":"https://api.github.com/users/mulesoft/orgs","repos_url":"https://api.github.com/users/mulesoft/repos","events_url":"https://api.github.com/users/mulesoft/events{/privacy}","received_events_url":"https://api.github.com/users/mulesoft/received_events","type":"Organization","site_admin":false},"repo":{"id":24748121,"name":"js-client-oauth2","full_name":"mulesoft/js-client-oauth2","owner":{"login":"mulesoft","id":185740,"avatar_url":"https://avatars.githubusercontent.com/u/185740?v=3","gravatar_id":"","url":"https://api.github.com/users/mulesoft","html_url":"https://github.com/mulesoft","followers_url":"https://api.github.com/users/mulesoft/followers","following_url":"https://api.github.com/users/mulesoft/following{/other_user}","gists_url":"https://api.github.com/users/mulesoft/gists{/gist_id}","starred_url":"https://api.github.com/users/mulesoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mulesoft/subscriptions","organizations_url":"https://api.github.com/users/mulesoft/orgs","repos_url":"https://api.github.com/users/mulesoft/repos","events_url":"https://api.github.com/users/mulesoft/events{/privacy}","received_events_url":"https://api.github.com/users/mulesoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mulesoft/js-client-oauth2","description":"A JavaScript implementation of an oauth2 client, for inclusion in the JavaScript client generator for APIs described with RAML.","fork":false,"url":"https://api.github.com/repos/mulesoft/js-client-oauth2","forks_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/forks","keys_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/teams","hooks_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/hooks","issue_events_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/issues/events{/number}","events_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/events","assignees_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/assignees{/user}","branches_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/branches{/branch}","tags_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/tags","blobs_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/git/refs{/sha}","trees_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/statuses/{sha}","languages_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/languages","stargazers_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/stargazers","contributors_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/contributors","subscribers_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/subscribers","subscription_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/subscription","commits_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/commits{/sha}","git_commits_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/git/commits{/sha}","comments_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/comments{/number}","issue_comment_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/issues/comments{/number}","contents_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/contents/{+path}","compare_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/merges","archive_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/downloads","issues_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/issues{/number}","pulls_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/pulls{/number}","milestones_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/milestones{/number}","notifications_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/labels{/name}","releases_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/releases{/id}","deployments_url":"https://api.github.com/repos/mulesoft/js-client-oauth2/deployments","created_at":"2014-10-03T05:45:33Z","updated_at":"2016-09-13T17:16:52Z","pushed_at":"2016-09-21T18:12:07Z","git_url":"git://github.com/mulesoft/js-client-oauth2.git","ssh_url":"git@github.com:mulesoft/js-client-oauth2.git","clone_url":"https://github.com/mulesoft/js-client-oauth2.git","svn_url":"https://github.com/mulesoft/js-client-oauth2","homepage":null,"size":163,"stargazers_count":75,"watchers_count":75,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":27,"mirror_url":null,"open_issues_count":4,"forks":27,"open_issues":4,"watchers":75,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mulesoft/js-client-oauth2/pulls/29"},"html":{"href":"https://github.com/mulesoft/js-client-oauth2/pull/29"},"issue":{"href":"https://api.github.com/repos/mulesoft/js-client-oauth2/issues/29"},"comments":{"href":"https://api.github.com/repos/mulesoft/js-client-oauth2/issues/29/comments"},"review_comments":{"href":"https://api.github.com/repos/mulesoft/js-client-oauth2/pulls/29/comments"},"review_comment":{"href":"https://api.github.com/repos/mulesoft/js-client-oauth2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mulesoft/js-client-oauth2/pulls/29/commits"},"statuses":{"href":"https://api.github.com/repos/mulesoft/js-client-oauth2/statuses/2dde116ecad7fb38d72f960203fe9f8bec860b29"}}}}
{"actor":{"display_login":"blakeembrey"}}