{"action":"created","comment":{"url":"https://api.github.com/repos/bodhiproject/bodhi-ui/pulls/comments/166206120","pull_request_review_id":94245147,"id":166206120,"diff_hunk":"@@ -0,0 +1,42 @@\n+import fetch from 'node-fetch';\n+\n+/**\n+ * Executes an HTTP request.\n+ * @param url {String} The URL we want to request.\n+ * @param options {Object} The fetch options.\n+ * @return {Object} The response data as a Promise.\n+ */\n+export function request(url, options) {\n+  console.log('url:', url, 'options:', options);\n+\n+  return fetch(url, options)\n+    .then(checkStatusCode)\n+    .then(parseResponse);\n+}\n+\n+function checkStatusCode(response) {\n+  if (response.status >= 200 && response.status < 300) {\n+    return Promise.resolve(response);\n+  }\n+  return Promise.reject(new Error(response.statusText));\n+}\n+\n+/**\n+ * Parses the HTTP response returned by a network request.\n+ * @param response {Object} A response from a network request.\n+ * @return {Object} The parsed JSON from the request.\n+ */\n+function parseResponse(response) {\n+  if (response.url === 'https://testnet.qtum.org/insight-api/statistics/total') {","path":"src/network/httpRequest.js","position":null,"original_position":30,"commit_id":"b71f49d0e3ea06274b2f4b112dc0f363772493e6","original_commit_id":"f68d6cbd6192336198a38c49d00dfac358fb1f75","user":{"login":"dwalintukan","id":4350404,"avatar_url":"https://avatars2.githubusercontent.com/u/4350404?v=4","gravatar_id":"","url":"https://api.github.com/users/dwalintukan","html_url":"https://github.com/dwalintukan","followers_url":"https://api.github.com/users/dwalintukan/followers","following_url":"https://api.github.com/users/dwalintukan/following{/other_user}","gists_url":"https://api.github.com/users/dwalintukan/gists{/gist_id}","starred_url":"https://api.github.com/users/dwalintukan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwalintukan/subscriptions","organizations_url":"https://api.github.com/users/dwalintukan/orgs","repos_url":"https://api.github.com/users/dwalintukan/repos","events_url":"https://api.github.com/users/dwalintukan/events{/privacy}","received_events_url":"https://api.github.com/users/dwalintukan/received_events","type":"User","site_admin":false},"body":"Nevermind. This was user error (nothing to do with GZIP). I was trying to return `res.result` when that didn't exist for the insight-api. Fixed to return the correct payload. ","created_at":"2018-02-06T07:31:39Z","updated_at":"2018-02-06T07:31:39Z","html_url":"https://github.com/bodhiproject/bodhi-ui/pull/118#discussion_r166206120","pull_request_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/pulls/118","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/bodhiproject/bodhi-ui/pulls/comments/166206120"},"html":{"href":"https://github.com/bodhiproject/bodhi-ui/pull/118#discussion_r166206120"},"pull_request":{"href":"https://api.github.com/repos/bodhiproject/bodhi-ui/pulls/118"}},"in_reply_to_id":166188493},"pull_request":{"url":"https://api.github.com/repos/bodhiproject/bodhi-ui/pulls/118","id":167080351,"html_url":"https://github.com/bodhiproject/bodhi-ui/pull/118","diff_url":"https://github.com/bodhiproject/bodhi-ui/pull/118.diff","patch_url":"https://github.com/bodhiproject/bodhi-ui/pull/118.patch","issue_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/issues/118","number":118,"state":"open","locked":false,"title":"Get average block time from Insight-API","user":{"login":"dwalintukan","id":4350404,"avatar_url":"https://avatars2.githubusercontent.com/u/4350404?v=4","gravatar_id":"","url":"https://api.github.com/users/dwalintukan","html_url":"https://github.com/dwalintukan","followers_url":"https://api.github.com/users/dwalintukan/followers","following_url":"https://api.github.com/users/dwalintukan/following{/other_user}","gists_url":"https://api.github.com/users/dwalintukan/gists{/gist_id}","starred_url":"https://api.github.com/users/dwalintukan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwalintukan/subscriptions","organizations_url":"https://api.github.com/users/dwalintukan/orgs","repos_url":"https://api.github.com/users/dwalintukan/repos","events_url":"https://api.github.com/users/dwalintukan/events{/privacy}","received_events_url":"https://api.github.com/users/dwalintukan/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-02-05T08:17:16Z","updated_at":"2018-02-06T07:31:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9425b6d45a2ff251bc3086a8cd18efd7195d85a8","assignee":{"login":"dwalintukan","id":4350404,"avatar_url":"https://avatars2.githubusercontent.com/u/4350404?v=4","gravatar_id":"","url":"https://api.github.com/users/dwalintukan","html_url":"https://github.com/dwalintukan","followers_url":"https://api.github.com/users/dwalintukan/followers","following_url":"https://api.github.com/users/dwalintukan/following{/other_user}","gists_url":"https://api.github.com/users/dwalintukan/gists{/gist_id}","starred_url":"https://api.github.com/users/dwalintukan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwalintukan/subscriptions","organizations_url":"https://api.github.com/users/dwalintukan/orgs","repos_url":"https://api.github.com/users/dwalintukan/repos","events_url":"https://api.github.com/users/dwalintukan/events{/privacy}","received_events_url":"https://api.github.com/users/dwalintukan/received_events","type":"User","site_admin":false},"assignees":[{"login":"dwalintukan","id":4350404,"avatar_url":"https://avatars2.githubusercontent.com/u/4350404?v=4","gravatar_id":"","url":"https://api.github.com/users/dwalintukan","html_url":"https://github.com/dwalintukan","followers_url":"https://api.github.com/users/dwalintukan/followers","following_url":"https://api.github.com/users/dwalintukan/following{/other_user}","gists_url":"https://api.github.com/users/dwalintukan/gists{/gist_id}","starred_url":"https://api.github.com/users/dwalintukan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwalintukan/subscriptions","organizations_url":"https://api.github.com/users/dwalintukan/orgs","repos_url":"https://api.github.com/users/dwalintukan/repos","events_url":"https://api.github.com/users/dwalintukan/events{/privacy}","received_events_url":"https://api.github.com/users/dwalintukan/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"chrisli30","id":2616844,"avatar_url":"https://avatars0.githubusercontent.com/u/2616844?v=4","gravatar_id":"","url":"https://api.github.com/users/chrisli30","html_url":"https://github.com/chrisli30","followers_url":"https://api.github.com/users/chrisli30/followers","following_url":"https://api.github.com/users/chrisli30/following{/other_user}","gists_url":"https://api.github.com/users/chrisli30/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisli30/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisli30/subscriptions","organizations_url":"https://api.github.com/users/chrisli30/orgs","repos_url":"https://api.github.com/users/chrisli30/repos","events_url":"https://api.github.com/users/chrisli30/events{/privacy}","received_events_url":"https://api.github.com/users/chrisli30/received_events","type":"User","site_admin":false},{"login":"henryzbw","id":10339131,"avatar_url":"https://avatars0.githubusercontent.com/u/10339131?v=4","gravatar_id":"","url":"https://api.github.com/users/henryzbw","html_url":"https://github.com/henryzbw","followers_url":"https://api.github.com/users/henryzbw/followers","following_url":"https://api.github.com/users/henryzbw/following{/other_user}","gists_url":"https://api.github.com/users/henryzbw/gists{/gist_id}","starred_url":"https://api.github.com/users/henryzbw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henryzbw/subscriptions","organizations_url":"https://api.github.com/users/henryzbw/orgs","repos_url":"https://api.github.com/users/henryzbw/repos","events_url":"https://api.github.com/users/henryzbw/events{/privacy}","received_events_url":"https://api.github.com/users/henryzbw/received_events","type":"User","site_admin":false}],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/pulls/118/commits","review_comments_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/pulls/118/comments","review_comment_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/issues/118/comments","statuses_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/statuses/b71f49d0e3ea06274b2f4b112dc0f363772493e6","head":{"label":"bodhiproject:avg_time_insight","ref":"avg_time_insight","sha":"b71f49d0e3ea06274b2f4b112dc0f363772493e6","user":{"login":"bodhiproject","id":29763948,"avatar_url":"https://avatars2.githubusercontent.com/u/29763948?v=4","gravatar_id":"","url":"https://api.github.com/users/bodhiproject","html_url":"https://github.com/bodhiproject","followers_url":"https://api.github.com/users/bodhiproject/followers","following_url":"https://api.github.com/users/bodhiproject/following{/other_user}","gists_url":"https://api.github.com/users/bodhiproject/gists{/gist_id}","starred_url":"https://api.github.com/users/bodhiproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bodhiproject/subscriptions","organizations_url":"https://api.github.com/users/bodhiproject/orgs","repos_url":"https://api.github.com/users/bodhiproject/repos","events_url":"https://api.github.com/users/bodhiproject/events{/privacy}","received_events_url":"https://api.github.com/users/bodhiproject/received_events","type":"Organization","site_admin":false},"repo":{"id":104853568,"name":"bodhi-ui","full_name":"bodhiproject/bodhi-ui","owner":{"login":"bodhiproject","id":29763948,"avatar_url":"https://avatars2.githubusercontent.com/u/29763948?v=4","gravatar_id":"","url":"https://api.github.com/users/bodhiproject","html_url":"https://github.com/bodhiproject","followers_url":"https://api.github.com/users/bodhiproject/followers","following_url":"https://api.github.com/users/bodhiproject/following{/other_user}","gists_url":"https://api.github.com/users/bodhiproject/gists{/gist_id}","starred_url":"https://api.github.com/users/bodhiproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bodhiproject/subscriptions","organizations_url":"https://api.github.com/users/bodhiproject/orgs","repos_url":"https://api.github.com/users/bodhiproject/repos","events_url":"https://api.github.com/users/bodhiproject/events{/privacy}","received_events_url":"https://api.github.com/users/bodhiproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bodhiproject/bodhi-ui","description":"An open source ui for interacting with bodhi api","fork":false,"url":"https://api.github.com/repos/bodhiproject/bodhi-ui","forks_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/forks","keys_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/teams","hooks_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/hooks","issue_events_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/issues/events{/number}","events_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/events","assignees_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/assignees{/user}","branches_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/branches{/branch}","tags_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/tags","blobs_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/languages","stargazers_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/stargazers","contributors_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/contributors","subscribers_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/subscribers","subscription_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/subscription","commits_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/contents/{+path}","compare_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/merges","archive_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/downloads","issues_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/issues{/number}","pulls_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/labels{/name}","releases_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/releases{/id}","deployments_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/deployments","created_at":"2017-09-26T07:52:34Z","updated_at":"2018-02-05T19:43:26Z","pushed_at":"2018-02-06T07:30:47Z","git_url":"git://github.com/bodhiproject/bodhi-ui.git","ssh_url":"git@github.com:bodhiproject/bodhi-ui.git","clone_url":"https://github.com/bodhiproject/bodhi-ui.git","svn_url":"https://github.com/bodhiproject/bodhi-ui","homepage":null,"size":3721,"stargazers_count":8,"watchers_count":8,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":23,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0"},"forks":0,"open_issues":23,"watchers":8,"default_branch":"master"}},"base":{"label":"bodhiproject:time_picker","ref":"time_picker","sha":"6c99cdbf6ba88aae39020081ebab0dd50a600eb1","user":{"login":"bodhiproject","id":29763948,"avatar_url":"https://avatars2.githubusercontent.com/u/29763948?v=4","gravatar_id":"","url":"https://api.github.com/users/bodhiproject","html_url":"https://github.com/bodhiproject","followers_url":"https://api.github.com/users/bodhiproject/followers","following_url":"https://api.github.com/users/bodhiproject/following{/other_user}","gists_url":"https://api.github.com/users/bodhiproject/gists{/gist_id}","starred_url":"https://api.github.com/users/bodhiproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bodhiproject/subscriptions","organizations_url":"https://api.github.com/users/bodhiproject/orgs","repos_url":"https://api.github.com/users/bodhiproject/repos","events_url":"https://api.github.com/users/bodhiproject/events{/privacy}","received_events_url":"https://api.github.com/users/bodhiproject/received_events","type":"Organization","site_admin":false},"repo":{"id":104853568,"name":"bodhi-ui","full_name":"bodhiproject/bodhi-ui","owner":{"login":"bodhiproject","id":29763948,"avatar_url":"https://avatars2.githubusercontent.com/u/29763948?v=4","gravatar_id":"","url":"https://api.github.com/users/bodhiproject","html_url":"https://github.com/bodhiproject","followers_url":"https://api.github.com/users/bodhiproject/followers","following_url":"https://api.github.com/users/bodhiproject/following{/other_user}","gists_url":"https://api.github.com/users/bodhiproject/gists{/gist_id}","starred_url":"https://api.github.com/users/bodhiproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bodhiproject/subscriptions","organizations_url":"https://api.github.com/users/bodhiproject/orgs","repos_url":"https://api.github.com/users/bodhiproject/repos","events_url":"https://api.github.com/users/bodhiproject/events{/privacy}","received_events_url":"https://api.github.com/users/bodhiproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bodhiproject/bodhi-ui","description":"An open source ui for interacting with bodhi api","fork":false,"url":"https://api.github.com/repos/bodhiproject/bodhi-ui","forks_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/forks","keys_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/teams","hooks_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/hooks","issue_events_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/issues/events{/number}","events_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/events","assignees_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/assignees{/user}","branches_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/branches{/branch}","tags_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/tags","blobs_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/languages","stargazers_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/stargazers","contributors_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/contributors","subscribers_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/subscribers","subscription_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/subscription","commits_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/contents/{+path}","compare_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/merges","archive_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/downloads","issues_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/issues{/number}","pulls_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/labels{/name}","releases_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/releases{/id}","deployments_url":"https://api.github.com/repos/bodhiproject/bodhi-ui/deployments","created_at":"2017-09-26T07:52:34Z","updated_at":"2018-02-05T19:43:26Z","pushed_at":"2018-02-06T07:30:47Z","git_url":"git://github.com/bodhiproject/bodhi-ui.git","ssh_url":"git@github.com:bodhiproject/bodhi-ui.git","clone_url":"https://github.com/bodhiproject/bodhi-ui.git","svn_url":"https://github.com/bodhiproject/bodhi-ui","homepage":null,"size":3721,"stargazers_count":8,"watchers_count":8,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":23,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0"},"forks":0,"open_issues":23,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bodhiproject/bodhi-ui/pulls/118"},"html":{"href":"https://github.com/bodhiproject/bodhi-ui/pull/118"},"issue":{"href":"https://api.github.com/repos/bodhiproject/bodhi-ui/issues/118"},"comments":{"href":"https://api.github.com/repos/bodhiproject/bodhi-ui/issues/118/comments"},"review_comments":{"href":"https://api.github.com/repos/bodhiproject/bodhi-ui/pulls/118/comments"},"review_comment":{"href":"https://api.github.com/repos/bodhiproject/bodhi-ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bodhiproject/bodhi-ui/pulls/118/commits"},"statuses":{"href":"https://api.github.com/repos/bodhiproject/bodhi-ui/statuses/b71f49d0e3ea06274b2f4b112dc0f363772493e6"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"dwalintukan"}}