{"action":"created","comment":{"url":"https://api.github.com/repos/mrtazz/restclient-cpp/pulls/comments/92924362","pull_request_review_id":13448888,"id":92924362,"diff_hunk":"@@ -209,6 +211,21 @@ RestClient::Connection::SetKeyPath(const std::string& keyPath) {\n   this->keyPath = keyPath;\n }\n \n+void\n+RestClient::Connection::SetProxy(const std::string& uriProxy) {\n+  if (uriProxy.empty())\n+    return;\n+\n+  std::string uriProxyUpper = uriProxy;\n+  std::transform(uriProxyUpper.begin(), uriProxyUpper.end(),\n+    uriProxyUpper.begin(), ::toupper);\n+\n+  if (uriProxyUpper.compare(0, 4, \"HTTP\") != 0)","path":"source/connection.cc","position":null,"original_position":22,"commit_id":"66f59c5625574e42d4c521779c48828d56b9658c","original_commit_id":"553c2384b2ddc1e6cd64b54e25f00c3f77384f24","user":{"login":"embeddedmz","id":10297393,"avatar_url":"https://avatars.githubusercontent.com/u/10297393?v=3","gravatar_id":"","url":"https://api.github.com/users/embeddedmz","html_url":"https://github.com/embeddedmz","followers_url":"https://api.github.com/users/embeddedmz/followers","following_url":"https://api.github.com/users/embeddedmz/following{/other_user}","gists_url":"https://api.github.com/users/embeddedmz/gists{/gist_id}","starred_url":"https://api.github.com/users/embeddedmz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/embeddedmz/subscriptions","organizations_url":"https://api.github.com/users/embeddedmz/orgs","repos_url":"https://api.github.com/users/embeddedmz/repos","events_url":"https://api.github.com/users/embeddedmz/events{/privacy}","received_events_url":"https://api.github.com/users/embeddedmz/received_events","type":"User","site_admin":false},"body":"Done !","created_at":"2016-12-17T16:23:03Z","updated_at":"2016-12-17T16:23:03Z","html_url":"https://github.com/mrtazz/restclient-cpp/pull/68#discussion_r92924362","pull_request_url":"https://api.github.com/repos/mrtazz/restclient-cpp/pulls/68","_links":{"self":{"href":"https://api.github.com/repos/mrtazz/restclient-cpp/pulls/comments/92924362"},"html":{"href":"https://github.com/mrtazz/restclient-cpp/pull/68#discussion_r92924362"},"pull_request":{"href":"https://api.github.com/repos/mrtazz/restclient-cpp/pulls/68"}}},"pull_request":{"url":"https://api.github.com/repos/mrtazz/restclient-cpp/pulls/68","id":98257920,"html_url":"https://github.com/mrtazz/restclient-cpp/pull/68","diff_url":"https://github.com/mrtazz/restclient-cpp/pull/68.diff","patch_url":"https://github.com/mrtazz/restclient-cpp/pull/68.patch","issue_url":"https://api.github.com/repos/mrtazz/restclient-cpp/issues/68","number":68,"state":"open","locked":false,"title":"HTTP Proxy Support","user":{"login":"embeddedmz","id":10297393,"avatar_url":"https://avatars.githubusercontent.com/u/10297393?v=3","gravatar_id":"","url":"https://api.github.com/users/embeddedmz","html_url":"https://github.com/embeddedmz","followers_url":"https://api.github.com/users/embeddedmz/followers","following_url":"https://api.github.com/users/embeddedmz/following{/other_user}","gists_url":"https://api.github.com/users/embeddedmz/gists{/gist_id}","starred_url":"https://api.github.com/users/embeddedmz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/embeddedmz/subscriptions","organizations_url":"https://api.github.com/users/embeddedmz/orgs","repos_url":"https://api.github.com/users/embeddedmz/repos","events_url":"https://api.github.com/users/embeddedmz/events{/privacy}","received_events_url":"https://api.github.com/users/embeddedmz/received_events","type":"User","site_admin":false},"body":"I added and tested a method to set a web HTTP proxy address and to tunnel an operation through it.\r\nIf the provided proxy address is invalid, the operation will fail and it's confirmed with the unit test \"TestInvalidProxy\".\r\n\r\nThe test I wrote (TestProxy) is based on a hard-coded proxy address from https://www.sslproxies.org/ \r\n\r\nPersonally, in my Google Test unit tests, I parse a configuration file (via simpleini API) to fetch test environment parameters (proxy/URL addresses, local paths...), this technique can be used to update the proxy address used in the unit test if it's not valid anymore and it will offer versatility for the other parameters used in the other unit tests.","created_at":"2016-12-16T00:24:10Z","updated_at":"2016-12-17T16:23:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ce6cdcfb3704a9a09a4355a213e75757e2dde01d","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/mrtazz/restclient-cpp/milestones/5","html_url":"https://github.com/mrtazz/restclient-cpp/milestone/5","labels_url":"https://api.github.com/repos/mrtazz/restclient-cpp/milestones/5/labels","id":2171400,"number":5,"title":"v0.5.0","description":"","creator":{"login":"mrtazz","id":68183,"avatar_url":"https://avatars.githubusercontent.com/u/68183?v=3","gravatar_id":"","url":"https://api.github.com/users/mrtazz","html_url":"https://github.com/mrtazz","followers_url":"https://api.github.com/users/mrtazz/followers","following_url":"https://api.github.com/users/mrtazz/following{/other_user}","gists_url":"https://api.github.com/users/mrtazz/gists{/gist_id}","starred_url":"https://api.github.com/users/mrtazz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrtazz/subscriptions","organizations_url":"https://api.github.com/users/mrtazz/orgs","repos_url":"https://api.github.com/users/mrtazz/repos","events_url":"https://api.github.com/users/mrtazz/events{/privacy}","received_events_url":"https://api.github.com/users/mrtazz/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":6,"state":"open","created_at":"2016-12-02T15:31:37Z","updated_at":"2016-12-17T01:57:13Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/mrtazz/restclient-cpp/pulls/68/commits","review_comments_url":"https://api.github.com/repos/mrtazz/restclient-cpp/pulls/68/comments","review_comment_url":"https://api.github.com/repos/mrtazz/restclient-cpp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mrtazz/restclient-cpp/issues/68/comments","statuses_url":"https://api.github.com/repos/mrtazz/restclient-cpp/statuses/66f59c5625574e42d4c521779c48828d56b9658c","head":{"label":"embeddedmz:master","ref":"master","sha":"66f59c5625574e42d4c521779c48828d56b9658c","user":{"login":"embeddedmz","id":10297393,"avatar_url":"https://avatars.githubusercontent.com/u/10297393?v=3","gravatar_id":"","url":"https://api.github.com/users/embeddedmz","html_url":"https://github.com/embeddedmz","followers_url":"https://api.github.com/users/embeddedmz/followers","following_url":"https://api.github.com/users/embeddedmz/following{/other_user}","gists_url":"https://api.github.com/users/embeddedmz/gists{/gist_id}","starred_url":"https://api.github.com/users/embeddedmz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/embeddedmz/subscriptions","organizations_url":"https://api.github.com/users/embeddedmz/orgs","repos_url":"https://api.github.com/users/embeddedmz/repos","events_url":"https://api.github.com/users/embeddedmz/events{/privacy}","received_events_url":"https://api.github.com/users/embeddedmz/received_events","type":"User","site_admin":false},"repo":{"id":76600040,"name":"restclient-cpp","full_name":"embeddedmz/restclient-cpp","owner":{"login":"embeddedmz","id":10297393,"avatar_url":"https://avatars.githubusercontent.com/u/10297393?v=3","gravatar_id":"","url":"https://api.github.com/users/embeddedmz","html_url":"https://github.com/embeddedmz","followers_url":"https://api.github.com/users/embeddedmz/followers","following_url":"https://api.github.com/users/embeddedmz/following{/other_user}","gists_url":"https://api.github.com/users/embeddedmz/gists{/gist_id}","starred_url":"https://api.github.com/users/embeddedmz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/embeddedmz/subscriptions","organizations_url":"https://api.github.com/users/embeddedmz/orgs","repos_url":"https://api.github.com/users/embeddedmz/repos","events_url":"https://api.github.com/users/embeddedmz/events{/privacy}","received_events_url":"https://api.github.com/users/embeddedmz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/embeddedmz/restclient-cpp","description":"C++ client for making HTTP/REST requests","fork":true,"url":"https://api.github.com/repos/embeddedmz/restclient-cpp","forks_url":"https://api.github.com/repos/embeddedmz/restclient-cpp/forks","keys_url":"https://api.github.com/repos/embeddedmz/restclient-cpp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/embeddedmz/restclient-cpp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/embeddedmz/restclient-cpp/teams","hooks_url":"https://api.github.com/repos/embeddedmz/restclient-cpp/hooks","issue_events_url":"https://api.github.com/repos/embeddedmz/restclient-cpp/issues/events{/number}","events_url":"https://api.github.com/repos/embeddedmz/restclient-cpp/events","assignees_url":"https://api.github.com/repos/embeddedmz/restclient-cpp/assignees{/user}","branches_url":"https://api.github.com/repos/embeddedmz/restclient-cpp/branches{/branch}","tags_url":"https://api.github.com/repos/embeddedmz/restclient-cpp/tags","blobs_url":"https://api.github.com/repos/embeddedmz/restclient-cpp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/embeddedmz/restclient-cpp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/embeddedmz/restclient-cpp/git/refs{/sha}","trees_url":"https://api.github.com/repos/embeddedmz/restclient-cpp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/embeddedmz/restclient-cpp/statuses/{sha}","languages_url":"https://api.github.com/repos/embeddedmz/restclient-cpp/languages","stargazers_url":"https://api.github.com/repos/embeddedmz/restclient-cpp/stargazers","contributors_url":"https://api.github.com/repos/embeddedmz/restclient-cpp/contributors","subscribers_url":"https://api.github.com/repos/embeddedmz/restclient-cpp/subscribers","subscription_url":"https://api.github.com/repos/embeddedmz/restclient-cpp/subscription","commits_url":"https://api.github.com/repos/embeddedmz/restclient-cpp/commits{/sha}","git_commits_url":"https://api.github.com/repos/embeddedmz/restclient-cpp/git/commits{/sha}","comments_url":"https://api.github.com/repos/embeddedmz/restclient-cpp/comments{/number}","issue_comment_url":"https://api.github.com/repos/embeddedmz/restclient-cpp/issues/comments{/number}","contents_url":"https://api.github.com/repos/embeddedmz/restclient-cpp/contents/{+path}","compare_url":"https://api.github.com/repos/embeddedmz/restclient-cpp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/embeddedmz/restclient-cpp/merges","archive_url":"https://api.github.com/repos/embeddedmz/restclient-cpp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/embeddedmz/restclient-cpp/downloads","issues_url":"https://api.github.com/repos/embeddedmz/restclient-cpp/issues{/number}","pulls_url":"https://api.github.com/repos/embeddedmz/restclient-cpp/pulls{/number}","milestones_url":"https://api.github.com/repos/embeddedmz/restclient-cpp/milestones{/number}","notifications_url":"https://api.github.com/repos/embeddedmz/restclient-cpp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/embeddedmz/restclient-cpp/labels{/name}","releases_url":"https://api.github.com/repos/embeddedmz/restclient-cpp/releases{/id}","deployments_url":"https://api.github.com/repos/embeddedmz/restclient-cpp/deployments","created_at":"2016-12-15T22:07:41Z","updated_at":"2016-12-15T22:07:42Z","pushed_at":"2016-12-17T16:22:39Z","git_url":"git://github.com/embeddedmz/restclient-cpp.git","ssh_url":"git@github.com:embeddedmz/restclient-cpp.git","clone_url":"https://github.com/embeddedmz/restclient-cpp.git","svn_url":"https://github.com/embeddedmz/restclient-cpp","homepage":"http://code.mrtazz.com/restclient-cpp/","size":6102,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"mrtazz:master","ref":"master","sha":"b0e0c0a91b8666ea9c64d6c204fa1a7f41b57ea0","user":{"login":"mrtazz","id":68183,"avatar_url":"https://avatars.githubusercontent.com/u/68183?v=3","gravatar_id":"","url":"https://api.github.com/users/mrtazz","html_url":"https://github.com/mrtazz","followers_url":"https://api.github.com/users/mrtazz/followers","following_url":"https://api.github.com/users/mrtazz/following{/other_user}","gists_url":"https://api.github.com/users/mrtazz/gists{/gist_id}","starred_url":"https://api.github.com/users/mrtazz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrtazz/subscriptions","organizations_url":"https://api.github.com/users/mrtazz/orgs","repos_url":"https://api.github.com/users/mrtazz/repos","events_url":"https://api.github.com/users/mrtazz/events{/privacy}","received_events_url":"https://api.github.com/users/mrtazz/received_events","type":"User","site_admin":false},"repo":{"id":997856,"name":"restclient-cpp","full_name":"mrtazz/restclient-cpp","owner":{"login":"mrtazz","id":68183,"avatar_url":"https://avatars.githubusercontent.com/u/68183?v=3","gravatar_id":"","url":"https://api.github.com/users/mrtazz","html_url":"https://github.com/mrtazz","followers_url":"https://api.github.com/users/mrtazz/followers","following_url":"https://api.github.com/users/mrtazz/following{/other_user}","gists_url":"https://api.github.com/users/mrtazz/gists{/gist_id}","starred_url":"https://api.github.com/users/mrtazz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrtazz/subscriptions","organizations_url":"https://api.github.com/users/mrtazz/orgs","repos_url":"https://api.github.com/users/mrtazz/repos","events_url":"https://api.github.com/users/mrtazz/events{/privacy}","received_events_url":"https://api.github.com/users/mrtazz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mrtazz/restclient-cpp","description":"C++ client for making HTTP/REST requests","fork":false,"url":"https://api.github.com/repos/mrtazz/restclient-cpp","forks_url":"https://api.github.com/repos/mrtazz/restclient-cpp/forks","keys_url":"https://api.github.com/repos/mrtazz/restclient-cpp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mrtazz/restclient-cpp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mrtazz/restclient-cpp/teams","hooks_url":"https://api.github.com/repos/mrtazz/restclient-cpp/hooks","issue_events_url":"https://api.github.com/repos/mrtazz/restclient-cpp/issues/events{/number}","events_url":"https://api.github.com/repos/mrtazz/restclient-cpp/events","assignees_url":"https://api.github.com/repos/mrtazz/restclient-cpp/assignees{/user}","branches_url":"https://api.github.com/repos/mrtazz/restclient-cpp/branches{/branch}","tags_url":"https://api.github.com/repos/mrtazz/restclient-cpp/tags","blobs_url":"https://api.github.com/repos/mrtazz/restclient-cpp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mrtazz/restclient-cpp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mrtazz/restclient-cpp/git/refs{/sha}","trees_url":"https://api.github.com/repos/mrtazz/restclient-cpp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mrtazz/restclient-cpp/statuses/{sha}","languages_url":"https://api.github.com/repos/mrtazz/restclient-cpp/languages","stargazers_url":"https://api.github.com/repos/mrtazz/restclient-cpp/stargazers","contributors_url":"https://api.github.com/repos/mrtazz/restclient-cpp/contributors","subscribers_url":"https://api.github.com/repos/mrtazz/restclient-cpp/subscribers","subscription_url":"https://api.github.com/repos/mrtazz/restclient-cpp/subscription","commits_url":"https://api.github.com/repos/mrtazz/restclient-cpp/commits{/sha}","git_commits_url":"https://api.github.com/repos/mrtazz/restclient-cpp/git/commits{/sha}","comments_url":"https://api.github.com/repos/mrtazz/restclient-cpp/comments{/number}","issue_comment_url":"https://api.github.com/repos/mrtazz/restclient-cpp/issues/comments{/number}","contents_url":"https://api.github.com/repos/mrtazz/restclient-cpp/contents/{+path}","compare_url":"https://api.github.com/repos/mrtazz/restclient-cpp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mrtazz/restclient-cpp/merges","archive_url":"https://api.github.com/repos/mrtazz/restclient-cpp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mrtazz/restclient-cpp/downloads","issues_url":"https://api.github.com/repos/mrtazz/restclient-cpp/issues{/number}","pulls_url":"https://api.github.com/repos/mrtazz/restclient-cpp/pulls{/number}","milestones_url":"https://api.github.com/repos/mrtazz/restclient-cpp/milestones{/number}","notifications_url":"https://api.github.com/repos/mrtazz/restclient-cpp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mrtazz/restclient-cpp/labels{/name}","releases_url":"https://api.github.com/repos/mrtazz/restclient-cpp/releases{/id}","deployments_url":"https://api.github.com/repos/mrtazz/restclient-cpp/deployments","created_at":"2010-10-18T15:13:05Z","updated_at":"2016-12-16T12:49:43Z","pushed_at":"2016-12-17T16:22:40Z","git_url":"git://github.com/mrtazz/restclient-cpp.git","ssh_url":"git@github.com:mrtazz/restclient-cpp.git","clone_url":"https://github.com/mrtazz/restclient-cpp.git","svn_url":"https://github.com/mrtazz/restclient-cpp","homepage":"http://code.mrtazz.com/restclient-cpp/","size":6437,"stargazers_count":398,"watchers_count":398,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":115,"mirror_url":null,"open_issues_count":8,"forks":115,"open_issues":8,"watchers":398,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mrtazz/restclient-cpp/pulls/68"},"html":{"href":"https://github.com/mrtazz/restclient-cpp/pull/68"},"issue":{"href":"https://api.github.com/repos/mrtazz/restclient-cpp/issues/68"},"comments":{"href":"https://api.github.com/repos/mrtazz/restclient-cpp/issues/68/comments"},"review_comments":{"href":"https://api.github.com/repos/mrtazz/restclient-cpp/pulls/68/comments"},"review_comment":{"href":"https://api.github.com/repos/mrtazz/restclient-cpp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mrtazz/restclient-cpp/pulls/68/commits"},"statuses":{"href":"https://api.github.com/repos/mrtazz/restclient-cpp/statuses/66f59c5625574e42d4c521779c48828d56b9658c"}}}}
{"actor":{"display_login":"embeddedmz"}}