{"action":"created","comment":{"url":"https://api.github.com/repos/prometheus/client_java/pulls/comments/87027740","pull_request_review_id":7656429,"id":87027740,"diff_hunk":"@@ -54,22 +49,69 @@\n  */\n public class PushGateway {\n \n-  private final String address;\n   private static final int SECONDS_PER_MILLISECOND = 1000;\n+\n+  private final String url;\n+\n+  private final String port;\n+\n+  private final String scheme;\n+\n   /**\n    * Construct a Pushgateway, with the given address.\n+   * The uri will be split by ':' into url and port.\n    * <p>\n-   * @param address  host:port or ip:port of the Pushgateway.\n+   *\n+   * @param address host:port or ip:port of the Pushgateway.\n    */\n   public PushGateway(String address) {\n-    this.address = address;\n+    this(address.split(\":\")[0], address.split(\":\")[1]);\n+  }\n+\n+  /**\n+   * Construct a Pushgateway, with the given url and port.\n+   * <p>\n+   *\n+   * @param url host or ip of the Pushgateway.\n+   * @param port    port of the Pushgateway.\n+   */\n+  public PushGateway(String url, String port) {\n+    this(\"http\", url, port, null);\n+  }\n+\n+  /**\n+   * Construct a Pushgateway, with the given address.\n+   * <p>\n+   *\n+   * @param scheme   url scheme of the Pushgateway.\n+   * @param url  host or ip of the Pushgateway.\n+   * @param port     port of the Pushgateway.\n+   * @param authenticator authenticator for the Pushgateway.\n+   */\n+  public PushGateway(String scheme, String url, String port, Authenticator authenticator) {","path":"simpleclient_pushgateway/src/main/java/io/prometheus/client/exporter/PushGateway.java","position":69,"original_position":69,"commit_id":"806af2ea67af181e85dd2f00993e8c52fccaa610","original_commit_id":"806af2ea67af181e85dd2f00993e8c52fccaa610","user":{"login":"brian-brazil","id":7115638,"avatar_url":"https://avatars.githubusercontent.com/u/7115638?v=3","gravatar_id":"","url":"https://api.github.com/users/brian-brazil","html_url":"https://github.com/brian-brazil","followers_url":"https://api.github.com/users/brian-brazil/followers","following_url":"https://api.github.com/users/brian-brazil/following{/other_user}","gists_url":"https://api.github.com/users/brian-brazil/gists{/gist_id}","starred_url":"https://api.github.com/users/brian-brazil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brian-brazil/subscriptions","organizations_url":"https://api.github.com/users/brian-brazil/orgs","repos_url":"https://api.github.com/users/brian-brazil/repos","events_url":"https://api.github.com/users/brian-brazil/events{/privacy}","received_events_url":"https://api.github.com/users/brian-brazil/received_events","type":"User","site_admin":false},"body":"Scheme is also part of a URL","created_at":"2016-11-08T16:32:01Z","updated_at":"2016-11-08T16:33:54Z","html_url":"https://github.com/prometheus/client_java/pull/155#discussion_r87027740","pull_request_url":"https://api.github.com/repos/prometheus/client_java/pulls/155","_links":{"self":{"href":"https://api.github.com/repos/prometheus/client_java/pulls/comments/87027740"},"html":{"href":"https://github.com/prometheus/client_java/pull/155#discussion_r87027740"},"pull_request":{"href":"https://api.github.com/repos/prometheus/client_java/pulls/155"}}},"pull_request":{"url":"https://api.github.com/repos/prometheus/client_java/pulls/155","id":92751978,"html_url":"https://github.com/prometheus/client_java/pull/155","diff_url":"https://github.com/prometheus/client_java/pull/155.diff","patch_url":"https://github.com/prometheus/client_java/pull/155.patch","issue_url":"https://api.github.com/repos/prometheus/client_java/issues/155","number":155,"state":"open","locked":false,"title":"Add https and basic auth capability for PushGateway","user":{"login":"Eloo","id":2631895,"avatar_url":"https://avatars.githubusercontent.com/u/2631895?v=3","gravatar_id":"","url":"https://api.github.com/users/Eloo","html_url":"https://github.com/Eloo","followers_url":"https://api.github.com/users/Eloo/followers","following_url":"https://api.github.com/users/Eloo/following{/other_user}","gists_url":"https://api.github.com/users/Eloo/gists{/gist_id}","starred_url":"https://api.github.com/users/Eloo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eloo/subscriptions","organizations_url":"https://api.github.com/users/Eloo/orgs","repos_url":"https://api.github.com/users/Eloo/repos","events_url":"https://api.github.com/users/Eloo/events{/privacy}","received_events_url":"https://api.github.com/users/Eloo/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-08T10:32:39Z","updated_at":"2016-11-08T16:33:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"de60dd5070f1b09de4859613168659b61bf42228","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/prometheus/client_java/pulls/155/commits","review_comments_url":"https://api.github.com/repos/prometheus/client_java/pulls/155/comments","review_comment_url":"https://api.github.com/repos/prometheus/client_java/pulls/comments{/number}","comments_url":"https://api.github.com/repos/prometheus/client_java/issues/155/comments","statuses_url":"https://api.github.com/repos/prometheus/client_java/statuses/806af2ea67af181e85dd2f00993e8c52fccaa610","head":{"label":"Eloo:master","ref":"master","sha":"806af2ea67af181e85dd2f00993e8c52fccaa610","user":{"login":"Eloo","id":2631895,"avatar_url":"https://avatars.githubusercontent.com/u/2631895?v=3","gravatar_id":"","url":"https://api.github.com/users/Eloo","html_url":"https://github.com/Eloo","followers_url":"https://api.github.com/users/Eloo/followers","following_url":"https://api.github.com/users/Eloo/following{/other_user}","gists_url":"https://api.github.com/users/Eloo/gists{/gist_id}","starred_url":"https://api.github.com/users/Eloo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eloo/subscriptions","organizations_url":"https://api.github.com/users/Eloo/orgs","repos_url":"https://api.github.com/users/Eloo/repos","events_url":"https://api.github.com/users/Eloo/events{/privacy}","received_events_url":"https://api.github.com/users/Eloo/received_events","type":"User","site_admin":false},"repo":{"id":73093499,"name":"client_java","full_name":"Eloo/client_java","owner":{"login":"Eloo","id":2631895,"avatar_url":"https://avatars.githubusercontent.com/u/2631895?v=3","gravatar_id":"","url":"https://api.github.com/users/Eloo","html_url":"https://github.com/Eloo","followers_url":"https://api.github.com/users/Eloo/followers","following_url":"https://api.github.com/users/Eloo/following{/other_user}","gists_url":"https://api.github.com/users/Eloo/gists{/gist_id}","starred_url":"https://api.github.com/users/Eloo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eloo/subscriptions","organizations_url":"https://api.github.com/users/Eloo/orgs","repos_url":"https://api.github.com/users/Eloo/repos","events_url":"https://api.github.com/users/Eloo/events{/privacy}","received_events_url":"https://api.github.com/users/Eloo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Eloo/client_java","description":"Prometheus instrumentation library for JVM applications","fork":true,"url":"https://api.github.com/repos/Eloo/client_java","forks_url":"https://api.github.com/repos/Eloo/client_java/forks","keys_url":"https://api.github.com/repos/Eloo/client_java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Eloo/client_java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Eloo/client_java/teams","hooks_url":"https://api.github.com/repos/Eloo/client_java/hooks","issue_events_url":"https://api.github.com/repos/Eloo/client_java/issues/events{/number}","events_url":"https://api.github.com/repos/Eloo/client_java/events","assignees_url":"https://api.github.com/repos/Eloo/client_java/assignees{/user}","branches_url":"https://api.github.com/repos/Eloo/client_java/branches{/branch}","tags_url":"https://api.github.com/repos/Eloo/client_java/tags","blobs_url":"https://api.github.com/repos/Eloo/client_java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Eloo/client_java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Eloo/client_java/git/refs{/sha}","trees_url":"https://api.github.com/repos/Eloo/client_java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Eloo/client_java/statuses/{sha}","languages_url":"https://api.github.com/repos/Eloo/client_java/languages","stargazers_url":"https://api.github.com/repos/Eloo/client_java/stargazers","contributors_url":"https://api.github.com/repos/Eloo/client_java/contributors","subscribers_url":"https://api.github.com/repos/Eloo/client_java/subscribers","subscription_url":"https://api.github.com/repos/Eloo/client_java/subscription","commits_url":"https://api.github.com/repos/Eloo/client_java/commits{/sha}","git_commits_url":"https://api.github.com/repos/Eloo/client_java/git/commits{/sha}","comments_url":"https://api.github.com/repos/Eloo/client_java/comments{/number}","issue_comment_url":"https://api.github.com/repos/Eloo/client_java/issues/comments{/number}","contents_url":"https://api.github.com/repos/Eloo/client_java/contents/{+path}","compare_url":"https://api.github.com/repos/Eloo/client_java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Eloo/client_java/merges","archive_url":"https://api.github.com/repos/Eloo/client_java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Eloo/client_java/downloads","issues_url":"https://api.github.com/repos/Eloo/client_java/issues{/number}","pulls_url":"https://api.github.com/repos/Eloo/client_java/pulls{/number}","milestones_url":"https://api.github.com/repos/Eloo/client_java/milestones{/number}","notifications_url":"https://api.github.com/repos/Eloo/client_java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Eloo/client_java/labels{/name}","releases_url":"https://api.github.com/repos/Eloo/client_java/releases{/id}","deployments_url":"https://api.github.com/repos/Eloo/client_java/deployments","created_at":"2016-11-07T15:38:22Z","updated_at":"2016-11-07T15:38:23Z","pushed_at":"2016-11-08T13:19:57Z","git_url":"git://github.com/Eloo/client_java.git","ssh_url":"git@github.com:Eloo/client_java.git","clone_url":"https://github.com/Eloo/client_java.git","svn_url":"https://github.com/Eloo/client_java","homepage":"","size":1897,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"prometheus:master","ref":"master","sha":"9642ec1034a65f8b679127551aeec32107603fef","user":{"login":"prometheus","id":3380462,"avatar_url":"https://avatars.githubusercontent.com/u/3380462?v=3","gravatar_id":"","url":"https://api.github.com/users/prometheus","html_url":"https://github.com/prometheus","followers_url":"https://api.github.com/users/prometheus/followers","following_url":"https://api.github.com/users/prometheus/following{/other_user}","gists_url":"https://api.github.com/users/prometheus/gists{/gist_id}","starred_url":"https://api.github.com/users/prometheus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prometheus/subscriptions","organizations_url":"https://api.github.com/users/prometheus/orgs","repos_url":"https://api.github.com/users/prometheus/repos","events_url":"https://api.github.com/users/prometheus/events{/privacy}","received_events_url":"https://api.github.com/users/prometheus/received_events","type":"Organization","site_admin":false},"repo":{"id":7997879,"name":"client_java","full_name":"prometheus/client_java","owner":{"login":"prometheus","id":3380462,"avatar_url":"https://avatars.githubusercontent.com/u/3380462?v=3","gravatar_id":"","url":"https://api.github.com/users/prometheus","html_url":"https://github.com/prometheus","followers_url":"https://api.github.com/users/prometheus/followers","following_url":"https://api.github.com/users/prometheus/following{/other_user}","gists_url":"https://api.github.com/users/prometheus/gists{/gist_id}","starred_url":"https://api.github.com/users/prometheus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prometheus/subscriptions","organizations_url":"https://api.github.com/users/prometheus/orgs","repos_url":"https://api.github.com/users/prometheus/repos","events_url":"https://api.github.com/users/prometheus/events{/privacy}","received_events_url":"https://api.github.com/users/prometheus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/prometheus/client_java","description":"Prometheus instrumentation library for JVM applications","fork":false,"url":"https://api.github.com/repos/prometheus/client_java","forks_url":"https://api.github.com/repos/prometheus/client_java/forks","keys_url":"https://api.github.com/repos/prometheus/client_java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prometheus/client_java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prometheus/client_java/teams","hooks_url":"https://api.github.com/repos/prometheus/client_java/hooks","issue_events_url":"https://api.github.com/repos/prometheus/client_java/issues/events{/number}","events_url":"https://api.github.com/repos/prometheus/client_java/events","assignees_url":"https://api.github.com/repos/prometheus/client_java/assignees{/user}","branches_url":"https://api.github.com/repos/prometheus/client_java/branches{/branch}","tags_url":"https://api.github.com/repos/prometheus/client_java/tags","blobs_url":"https://api.github.com/repos/prometheus/client_java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prometheus/client_java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prometheus/client_java/git/refs{/sha}","trees_url":"https://api.github.com/repos/prometheus/client_java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prometheus/client_java/statuses/{sha}","languages_url":"https://api.github.com/repos/prometheus/client_java/languages","stargazers_url":"https://api.github.com/repos/prometheus/client_java/stargazers","contributors_url":"https://api.github.com/repos/prometheus/client_java/contributors","subscribers_url":"https://api.github.com/repos/prometheus/client_java/subscribers","subscription_url":"https://api.github.com/repos/prometheus/client_java/subscription","commits_url":"https://api.github.com/repos/prometheus/client_java/commits{/sha}","git_commits_url":"https://api.github.com/repos/prometheus/client_java/git/commits{/sha}","comments_url":"https://api.github.com/repos/prometheus/client_java/comments{/number}","issue_comment_url":"https://api.github.com/repos/prometheus/client_java/issues/comments{/number}","contents_url":"https://api.github.com/repos/prometheus/client_java/contents/{+path}","compare_url":"https://api.github.com/repos/prometheus/client_java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prometheus/client_java/merges","archive_url":"https://api.github.com/repos/prometheus/client_java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prometheus/client_java/downloads","issues_url":"https://api.github.com/repos/prometheus/client_java/issues{/number}","pulls_url":"https://api.github.com/repos/prometheus/client_java/pulls{/number}","milestones_url":"https://api.github.com/repos/prometheus/client_java/milestones{/number}","notifications_url":"https://api.github.com/repos/prometheus/client_java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prometheus/client_java/labels{/name}","releases_url":"https://api.github.com/repos/prometheus/client_java/releases{/id}","deployments_url":"https://api.github.com/repos/prometheus/client_java/deployments","created_at":"2013-02-03T22:55:49Z","updated_at":"2016-11-02T06:28:13Z","pushed_at":"2016-11-08T13:19:58Z","git_url":"git://github.com/prometheus/client_java.git","ssh_url":"git@github.com:prometheus/client_java.git","clone_url":"https://github.com/prometheus/client_java.git","svn_url":"https://github.com/prometheus/client_java","homepage":"","size":2092,"stargazers_count":82,"watchers_count":82,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":77,"mirror_url":null,"open_issues_count":10,"forks":77,"open_issues":10,"watchers":82,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/prometheus/client_java/pulls/155"},"html":{"href":"https://github.com/prometheus/client_java/pull/155"},"issue":{"href":"https://api.github.com/repos/prometheus/client_java/issues/155"},"comments":{"href":"https://api.github.com/repos/prometheus/client_java/issues/155/comments"},"review_comments":{"href":"https://api.github.com/repos/prometheus/client_java/pulls/155/comments"},"review_comment":{"href":"https://api.github.com/repos/prometheus/client_java/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/prometheus/client_java/pulls/155/commits"},"statuses":{"href":"https://api.github.com/repos/prometheus/client_java/statuses/806af2ea67af181e85dd2f00993e8c52fccaa610"}}}}
{"actor":{"display_login":"brian-brazil"}}