{"action":"created","comment":{"url":"https://api.github.com/repos/ericmj/xhttp/pulls/comments/232225010","pull_request_review_id":173374360,"id":232225010,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMjIyNTAxMA==","diff_hunk":"@@ -23,4 +23,49 @@ defmodule XHTTP.Util do\n     |> max(Keyword.fetch!(opts, :sndbuf))\n     |> max(Keyword.fetch!(opts, :recbuf))\n   end\n+\n+  def proxy_hostname_port(hostname, port, opts) do\n+    case Keyword.fetch(opts, :proxy) do\n+      {:ok, proxy} -> proxy\n+      :error -> {hostname, port}\n+    end\n+  end\n+\n+  def proxy_uri(transport, hostname, port, opts) do\n+    case Keyword.fetch(opts, :proxy) do\n+      {:ok, _proxy} ->\n+        \"#{transport_scheme(transport)}://#{hostname}:#{port}\"","path":"lib/xhttp/util.ex","position":15,"original_position":15,"commit_id":"c9735fa6636f93aa763d67c58235a22666b03568","original_commit_id":"c9735fa6636f93aa763d67c58235a22666b03568","user":{"login":"ericmj","id":316890,"node_id":"MDQ6VXNlcjMxNjg5MA==","avatar_url":"https://avatars3.githubusercontent.com/u/316890?v=4","gravatar_id":"","url":"https://api.github.com/users/ericmj","html_url":"https://github.com/ericmj","followers_url":"https://api.github.com/users/ericmj/followers","following_url":"https://api.github.com/users/ericmj/following{/other_user}","gists_url":"https://api.github.com/users/ericmj/gists{/gist_id}","starred_url":"https://api.github.com/users/ericmj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericmj/subscriptions","organizations_url":"https://api.github.com/users/ericmj/orgs","repos_url":"https://api.github.com/users/ericmj/repos","events_url":"https://api.github.com/users/ericmj/events{/privacy}","received_events_url":"https://api.github.com/users/ericmj/received_events","type":"User","site_admin":false},"body":"I don't think it adds much since `URI` does essentially the same thing.","created_at":"2018-11-09T11:36:22Z","updated_at":"2018-11-09T11:36:22Z","html_url":"https://github.com/ericmj/xhttp/pull/45#discussion_r232225010","pull_request_url":"https://api.github.com/repos/ericmj/xhttp/pulls/45","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/ericmj/xhttp/pulls/comments/232225010"},"html":{"href":"https://github.com/ericmj/xhttp/pull/45#discussion_r232225010"},"pull_request":{"href":"https://api.github.com/repos/ericmj/xhttp/pulls/45"}},"in_reply_to_id":232113463},"pull_request":{"url":"https://api.github.com/repos/ericmj/xhttp/pulls/45","id":229541301,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5NTQxMzAx","html_url":"https://github.com/ericmj/xhttp/pull/45","diff_url":"https://github.com/ericmj/xhttp/pull/45.diff","patch_url":"https://github.com/ericmj/xhttp/pull/45.patch","issue_url":"https://api.github.com/repos/ericmj/xhttp/issues/45","number":45,"state":"open","locked":false,"title":"Add absolute URI proxying for HTTP1","user":{"login":"ericmj","id":316890,"node_id":"MDQ6VXNlcjMxNjg5MA==","avatar_url":"https://avatars3.githubusercontent.com/u/316890?v=4","gravatar_id":"","url":"https://api.github.com/users/ericmj","html_url":"https://github.com/ericmj","followers_url":"https://api.github.com/users/ericmj/followers","following_url":"https://api.github.com/users/ericmj/following{/other_user}","gists_url":"https://api.github.com/users/ericmj/gists{/gist_id}","starred_url":"https://api.github.com/users/ericmj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericmj/subscriptions","organizations_url":"https://api.github.com/users/ericmj/orgs","repos_url":"https://api.github.com/users/ericmj/repos","events_url":"https://api.github.com/users/ericmj/events{/privacy}","received_events_url":"https://api.github.com/users/ericmj/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-11-08T23:23:41Z","updated_at":"2018-11-09T11:36:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c52008841202b6e40359afb473dabe50f80e2e11","assignee":null,"assignees":[],"requested_reviewers":[{"login":"whatyouhide","id":3890250,"node_id":"MDQ6VXNlcjM4OTAyNTA=","avatar_url":"https://avatars3.githubusercontent.com/u/3890250?v=4","gravatar_id":"","url":"https://api.github.com/users/whatyouhide","html_url":"https://github.com/whatyouhide","followers_url":"https://api.github.com/users/whatyouhide/followers","following_url":"https://api.github.com/users/whatyouhide/following{/other_user}","gists_url":"https://api.github.com/users/whatyouhide/gists{/gist_id}","starred_url":"https://api.github.com/users/whatyouhide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whatyouhide/subscriptions","organizations_url":"https://api.github.com/users/whatyouhide/orgs","repos_url":"https://api.github.com/users/whatyouhide/repos","events_url":"https://api.github.com/users/whatyouhide/events{/privacy}","received_events_url":"https://api.github.com/users/whatyouhide/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ericmj/xhttp/pulls/45/commits","review_comments_url":"https://api.github.com/repos/ericmj/xhttp/pulls/45/comments","review_comment_url":"https://api.github.com/repos/ericmj/xhttp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ericmj/xhttp/issues/45/comments","statuses_url":"https://api.github.com/repos/ericmj/xhttp/statuses/c9735fa6636f93aa763d67c58235a22666b03568","head":{"label":"ericmj:emj/proxy-absuri","ref":"emj/proxy-absuri","sha":"c9735fa6636f93aa763d67c58235a22666b03568","user":{"login":"ericmj","id":316890,"node_id":"MDQ6VXNlcjMxNjg5MA==","avatar_url":"https://avatars3.githubusercontent.com/u/316890?v=4","gravatar_id":"","url":"https://api.github.com/users/ericmj","html_url":"https://github.com/ericmj","followers_url":"https://api.github.com/users/ericmj/followers","following_url":"https://api.github.com/users/ericmj/following{/other_user}","gists_url":"https://api.github.com/users/ericmj/gists{/gist_id}","starred_url":"https://api.github.com/users/ericmj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericmj/subscriptions","organizations_url":"https://api.github.com/users/ericmj/orgs","repos_url":"https://api.github.com/users/ericmj/repos","events_url":"https://api.github.com/users/ericmj/events{/privacy}","received_events_url":"https://api.github.com/users/ericmj/received_events","type":"User","site_admin":false},"repo":{"id":108273415,"node_id":"MDEwOlJlcG9zaXRvcnkxMDgyNzM0MTU=","name":"xhttp","full_name":"ericmj/xhttp","private":false,"owner":{"login":"ericmj","id":316890,"node_id":"MDQ6VXNlcjMxNjg5MA==","avatar_url":"https://avatars3.githubusercontent.com/u/316890?v=4","gravatar_id":"","url":"https://api.github.com/users/ericmj","html_url":"https://github.com/ericmj","followers_url":"https://api.github.com/users/ericmj/followers","following_url":"https://api.github.com/users/ericmj/following{/other_user}","gists_url":"https://api.github.com/users/ericmj/gists{/gist_id}","starred_url":"https://api.github.com/users/ericmj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericmj/subscriptions","organizations_url":"https://api.github.com/users/ericmj/orgs","repos_url":"https://api.github.com/users/ericmj/repos","events_url":"https://api.github.com/users/ericmj/events{/privacy}","received_events_url":"https://api.github.com/users/ericmj/received_events","type":"User","site_admin":false},"html_url":"https://github.com/ericmj/xhttp","description":"Functional HTTP client for Elixir with support for HTTP/1 and HTTP/2","fork":false,"url":"https://api.github.com/repos/ericmj/xhttp","forks_url":"https://api.github.com/repos/ericmj/xhttp/forks","keys_url":"https://api.github.com/repos/ericmj/xhttp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ericmj/xhttp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ericmj/xhttp/teams","hooks_url":"https://api.github.com/repos/ericmj/xhttp/hooks","issue_events_url":"https://api.github.com/repos/ericmj/xhttp/issues/events{/number}","events_url":"https://api.github.com/repos/ericmj/xhttp/events","assignees_url":"https://api.github.com/repos/ericmj/xhttp/assignees{/user}","branches_url":"https://api.github.com/repos/ericmj/xhttp/branches{/branch}","tags_url":"https://api.github.com/repos/ericmj/xhttp/tags","blobs_url":"https://api.github.com/repos/ericmj/xhttp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ericmj/xhttp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ericmj/xhttp/git/refs{/sha}","trees_url":"https://api.github.com/repos/ericmj/xhttp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ericmj/xhttp/statuses/{sha}","languages_url":"https://api.github.com/repos/ericmj/xhttp/languages","stargazers_url":"https://api.github.com/repos/ericmj/xhttp/stargazers","contributors_url":"https://api.github.com/repos/ericmj/xhttp/contributors","subscribers_url":"https://api.github.com/repos/ericmj/xhttp/subscribers","subscription_url":"https://api.github.com/repos/ericmj/xhttp/subscription","commits_url":"https://api.github.com/repos/ericmj/xhttp/commits{/sha}","git_commits_url":"https://api.github.com/repos/ericmj/xhttp/git/commits{/sha}","comments_url":"https://api.github.com/repos/ericmj/xhttp/comments{/number}","issue_comment_url":"https://api.github.com/repos/ericmj/xhttp/issues/comments{/number}","contents_url":"https://api.github.com/repos/ericmj/xhttp/contents/{+path}","compare_url":"https://api.github.com/repos/ericmj/xhttp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ericmj/xhttp/merges","archive_url":"https://api.github.com/repos/ericmj/xhttp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ericmj/xhttp/downloads","issues_url":"https://api.github.com/repos/ericmj/xhttp/issues{/number}","pulls_url":"https://api.github.com/repos/ericmj/xhttp/pulls{/number}","milestones_url":"https://api.github.com/repos/ericmj/xhttp/milestones{/number}","notifications_url":"https://api.github.com/repos/ericmj/xhttp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ericmj/xhttp/labels{/name}","releases_url":"https://api.github.com/repos/ericmj/xhttp/releases{/id}","deployments_url":"https://api.github.com/repos/ericmj/xhttp/deployments","created_at":"2017-10-25T13:22:12Z","updated_at":"2018-11-08T11:12:54Z","pushed_at":"2018-11-08T23:24:34Z","git_url":"git://github.com/ericmj/xhttp.git","ssh_url":"git@github.com:ericmj/xhttp.git","clone_url":"https://github.com/ericmj/xhttp.git","svn_url":"https://github.com/ericmj/xhttp","homepage":"","size":201,"stargazers_count":163,"watchers_count":163,"language":"Elixir","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"archived":false,"open_issues_count":8,"license":null,"forks":11,"open_issues":8,"watchers":163,"default_branch":"master"}},"base":{"label":"ericmj:master","ref":"master","sha":"957ec48d8c6ec1e517084311029e0c0c109bf511","user":{"login":"ericmj","id":316890,"node_id":"MDQ6VXNlcjMxNjg5MA==","avatar_url":"https://avatars3.githubusercontent.com/u/316890?v=4","gravatar_id":"","url":"https://api.github.com/users/ericmj","html_url":"https://github.com/ericmj","followers_url":"https://api.github.com/users/ericmj/followers","following_url":"https://api.github.com/users/ericmj/following{/other_user}","gists_url":"https://api.github.com/users/ericmj/gists{/gist_id}","starred_url":"https://api.github.com/users/ericmj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericmj/subscriptions","organizations_url":"https://api.github.com/users/ericmj/orgs","repos_url":"https://api.github.com/users/ericmj/repos","events_url":"https://api.github.com/users/ericmj/events{/privacy}","received_events_url":"https://api.github.com/users/ericmj/received_events","type":"User","site_admin":false},"repo":{"id":108273415,"node_id":"MDEwOlJlcG9zaXRvcnkxMDgyNzM0MTU=","name":"xhttp","full_name":"ericmj/xhttp","private":false,"owner":{"login":"ericmj","id":316890,"node_id":"MDQ6VXNlcjMxNjg5MA==","avatar_url":"https://avatars3.githubusercontent.com/u/316890?v=4","gravatar_id":"","url":"https://api.github.com/users/ericmj","html_url":"https://github.com/ericmj","followers_url":"https://api.github.com/users/ericmj/followers","following_url":"https://api.github.com/users/ericmj/following{/other_user}","gists_url":"https://api.github.com/users/ericmj/gists{/gist_id}","starred_url":"https://api.github.com/users/ericmj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericmj/subscriptions","organizations_url":"https://api.github.com/users/ericmj/orgs","repos_url":"https://api.github.com/users/ericmj/repos","events_url":"https://api.github.com/users/ericmj/events{/privacy}","received_events_url":"https://api.github.com/users/ericmj/received_events","type":"User","site_admin":false},"html_url":"https://github.com/ericmj/xhttp","description":"Functional HTTP client for Elixir with support for HTTP/1 and HTTP/2","fork":false,"url":"https://api.github.com/repos/ericmj/xhttp","forks_url":"https://api.github.com/repos/ericmj/xhttp/forks","keys_url":"https://api.github.com/repos/ericmj/xhttp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ericmj/xhttp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ericmj/xhttp/teams","hooks_url":"https://api.github.com/repos/ericmj/xhttp/hooks","issue_events_url":"https://api.github.com/repos/ericmj/xhttp/issues/events{/number}","events_url":"https://api.github.com/repos/ericmj/xhttp/events","assignees_url":"https://api.github.com/repos/ericmj/xhttp/assignees{/user}","branches_url":"https://api.github.com/repos/ericmj/xhttp/branches{/branch}","tags_url":"https://api.github.com/repos/ericmj/xhttp/tags","blobs_url":"https://api.github.com/repos/ericmj/xhttp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ericmj/xhttp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ericmj/xhttp/git/refs{/sha}","trees_url":"https://api.github.com/repos/ericmj/xhttp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ericmj/xhttp/statuses/{sha}","languages_url":"https://api.github.com/repos/ericmj/xhttp/languages","stargazers_url":"https://api.github.com/repos/ericmj/xhttp/stargazers","contributors_url":"https://api.github.com/repos/ericmj/xhttp/contributors","subscribers_url":"https://api.github.com/repos/ericmj/xhttp/subscribers","subscription_url":"https://api.github.com/repos/ericmj/xhttp/subscription","commits_url":"https://api.github.com/repos/ericmj/xhttp/commits{/sha}","git_commits_url":"https://api.github.com/repos/ericmj/xhttp/git/commits{/sha}","comments_url":"https://api.github.com/repos/ericmj/xhttp/comments{/number}","issue_comment_url":"https://api.github.com/repos/ericmj/xhttp/issues/comments{/number}","contents_url":"https://api.github.com/repos/ericmj/xhttp/contents/{+path}","compare_url":"https://api.github.com/repos/ericmj/xhttp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ericmj/xhttp/merges","archive_url":"https://api.github.com/repos/ericmj/xhttp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ericmj/xhttp/downloads","issues_url":"https://api.github.com/repos/ericmj/xhttp/issues{/number}","pulls_url":"https://api.github.com/repos/ericmj/xhttp/pulls{/number}","milestones_url":"https://api.github.com/repos/ericmj/xhttp/milestones{/number}","notifications_url":"https://api.github.com/repos/ericmj/xhttp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ericmj/xhttp/labels{/name}","releases_url":"https://api.github.com/repos/ericmj/xhttp/releases{/id}","deployments_url":"https://api.github.com/repos/ericmj/xhttp/deployments","created_at":"2017-10-25T13:22:12Z","updated_at":"2018-11-08T11:12:54Z","pushed_at":"2018-11-08T23:24:34Z","git_url":"git://github.com/ericmj/xhttp.git","ssh_url":"git@github.com:ericmj/xhttp.git","clone_url":"https://github.com/ericmj/xhttp.git","svn_url":"https://github.com/ericmj/xhttp","homepage":"","size":201,"stargazers_count":163,"watchers_count":163,"language":"Elixir","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"archived":false,"open_issues_count":8,"license":null,"forks":11,"open_issues":8,"watchers":163,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ericmj/xhttp/pulls/45"},"html":{"href":"https://github.com/ericmj/xhttp/pull/45"},"issue":{"href":"https://api.github.com/repos/ericmj/xhttp/issues/45"},"comments":{"href":"https://api.github.com/repos/ericmj/xhttp/issues/45/comments"},"review_comments":{"href":"https://api.github.com/repos/ericmj/xhttp/pulls/45/comments"},"review_comment":{"href":"https://api.github.com/repos/ericmj/xhttp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ericmj/xhttp/pulls/45/commits"},"statuses":{"href":"https://api.github.com/repos/ericmj/xhttp/statuses/c9735fa6636f93aa763d67c58235a22666b03568"}},"author_association":"OWNER"}}
{"actor":{"display_login":"ericmj"}}