{"action":"opened","number":4,"pull_request":{"url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/pulls/4","id":229131391,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5MTMxMzkx","html_url":"https://github.com/dkorobtsov/LoggingInterceptor/pull/4","diff_url":"https://github.com/dkorobtsov/LoggingInterceptor/pull/4.diff","patch_url":"https://github.com/dkorobtsov/LoggingInterceptor/pull/4.patch","issue_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/issues/4","number":4,"state":"open","locked":false,"title":"Add support for apache httpclient library","user":{"login":"azakordonets","id":1200012,"node_id":"MDQ6VXNlcjEyMDAwMTI=","avatar_url":"https://avatars3.githubusercontent.com/u/1200012?v=4","gravatar_id":"","url":"https://api.github.com/users/azakordonets","html_url":"https://github.com/azakordonets","followers_url":"https://api.github.com/users/azakordonets/followers","following_url":"https://api.github.com/users/azakordonets/following{/other_user}","gists_url":"https://api.github.com/users/azakordonets/gists{/gist_id}","starred_url":"https://api.github.com/users/azakordonets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azakordonets/subscriptions","organizations_url":"https://api.github.com/users/azakordonets/orgs","repos_url":"https://api.github.com/users/azakordonets/repos","events_url":"https://api.github.com/users/azakordonets/events{/privacy}","received_events_url":"https://api.github.com/users/azakordonets/received_events","type":"User","site_admin":false},"body":"This pull request consists of quite some refactoring( sorry, wanted to split actions into separate commits, but there were too many changes). Here's an overview of what was done:\r\n* `LoggingInterceptor` was intoruduced. It can build interceptors for `okhttp`, `okhttp3`, `apache httpclient` clients.\r\n* `RequestDetails` object is intoroduced. It uses `okhttp3` Request underneath (creating totally separate thing that would consumer all 3 possible types of request would require way more effort)\r\n* I've extracted some common logic from Interceptors into `ClientPrintingExecutor` class - this reduced code duplication. \r\n* I wasn't able to reduce code duplication in `okhttp` and `okhttp3` interceptors because there different `Chain` instances are used and it doesn't implement any interface. :(\r\n* Added more unit tests - for cases when executor was specified in the builder, there was a bug with unit tests - unit test was not waiting for executor to finish it's printing and assertion was failing ( spent 2 hours figuring out why is that)\r\n* Added some simple negative unit tests to increase coverage. ","created_at":"2018-11-07T18:49:53Z","updated_at":"2018-11-07T18:49:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/pulls/4/commits","review_comments_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/pulls/4/comments","review_comment_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/issues/4/comments","statuses_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/statuses/0f7654302491513e5f5197e843cfb0de9cea170d","head":{"label":"azakordonets:master","ref":"master","sha":"0f7654302491513e5f5197e843cfb0de9cea170d","user":{"login":"azakordonets","id":1200012,"node_id":"MDQ6VXNlcjEyMDAwMTI=","avatar_url":"https://avatars3.githubusercontent.com/u/1200012?v=4","gravatar_id":"","url":"https://api.github.com/users/azakordonets","html_url":"https://github.com/azakordonets","followers_url":"https://api.github.com/users/azakordonets/followers","following_url":"https://api.github.com/users/azakordonets/following{/other_user}","gists_url":"https://api.github.com/users/azakordonets/gists{/gist_id}","starred_url":"https://api.github.com/users/azakordonets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azakordonets/subscriptions","organizations_url":"https://api.github.com/users/azakordonets/orgs","repos_url":"https://api.github.com/users/azakordonets/repos","events_url":"https://api.github.com/users/azakordonets/events{/privacy}","received_events_url":"https://api.github.com/users/azakordonets/received_events","type":"User","site_admin":false},"repo":{"id":153093919,"node_id":"MDEwOlJlcG9zaXRvcnkxNTMwOTM5MTk=","name":"LoggingInterceptor","full_name":"azakordonets/LoggingInterceptor","private":false,"owner":{"login":"azakordonets","id":1200012,"node_id":"MDQ6VXNlcjEyMDAwMTI=","avatar_url":"https://avatars3.githubusercontent.com/u/1200012?v=4","gravatar_id":"","url":"https://api.github.com/users/azakordonets","html_url":"https://github.com/azakordonets","followers_url":"https://api.github.com/users/azakordonets/followers","following_url":"https://api.github.com/users/azakordonets/following{/other_user}","gists_url":"https://api.github.com/users/azakordonets/gists{/gist_id}","starred_url":"https://api.github.com/users/azakordonets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azakordonets/subscriptions","organizations_url":"https://api.github.com/users/azakordonets/orgs","repos_url":"https://api.github.com/users/azakordonets/repos","events_url":"https://api.github.com/users/azakordonets/events{/privacy}","received_events_url":"https://api.github.com/users/azakordonets/received_events","type":"User","site_admin":false},"html_url":"https://github.com/azakordonets/LoggingInterceptor","description":"An OkHttp interceptor which pretty logs request and response data. (version for use with Java logging frameworks - jul, log4j, slf4j, logback, log4j2 etc)","fork":true,"url":"https://api.github.com/repos/azakordonets/LoggingInterceptor","forks_url":"https://api.github.com/repos/azakordonets/LoggingInterceptor/forks","keys_url":"https://api.github.com/repos/azakordonets/LoggingInterceptor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/azakordonets/LoggingInterceptor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/azakordonets/LoggingInterceptor/teams","hooks_url":"https://api.github.com/repos/azakordonets/LoggingInterceptor/hooks","issue_events_url":"https://api.github.com/repos/azakordonets/LoggingInterceptor/issues/events{/number}","events_url":"https://api.github.com/repos/azakordonets/LoggingInterceptor/events","assignees_url":"https://api.github.com/repos/azakordonets/LoggingInterceptor/assignees{/user}","branches_url":"https://api.github.com/repos/azakordonets/LoggingInterceptor/branches{/branch}","tags_url":"https://api.github.com/repos/azakordonets/LoggingInterceptor/tags","blobs_url":"https://api.github.com/repos/azakordonets/LoggingInterceptor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/azakordonets/LoggingInterceptor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/azakordonets/LoggingInterceptor/git/refs{/sha}","trees_url":"https://api.github.com/repos/azakordonets/LoggingInterceptor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/azakordonets/LoggingInterceptor/statuses/{sha}","languages_url":"https://api.github.com/repos/azakordonets/LoggingInterceptor/languages","stargazers_url":"https://api.github.com/repos/azakordonets/LoggingInterceptor/stargazers","contributors_url":"https://api.github.com/repos/azakordonets/LoggingInterceptor/contributors","subscribers_url":"https://api.github.com/repos/azakordonets/LoggingInterceptor/subscribers","subscription_url":"https://api.github.com/repos/azakordonets/LoggingInterceptor/subscription","commits_url":"https://api.github.com/repos/azakordonets/LoggingInterceptor/commits{/sha}","git_commits_url":"https://api.github.com/repos/azakordonets/LoggingInterceptor/git/commits{/sha}","comments_url":"https://api.github.com/repos/azakordonets/LoggingInterceptor/comments{/number}","issue_comment_url":"https://api.github.com/repos/azakordonets/LoggingInterceptor/issues/comments{/number}","contents_url":"https://api.github.com/repos/azakordonets/LoggingInterceptor/contents/{+path}","compare_url":"https://api.github.com/repos/azakordonets/LoggingInterceptor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/azakordonets/LoggingInterceptor/merges","archive_url":"https://api.github.com/repos/azakordonets/LoggingInterceptor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/azakordonets/LoggingInterceptor/downloads","issues_url":"https://api.github.com/repos/azakordonets/LoggingInterceptor/issues{/number}","pulls_url":"https://api.github.com/repos/azakordonets/LoggingInterceptor/pulls{/number}","milestones_url":"https://api.github.com/repos/azakordonets/LoggingInterceptor/milestones{/number}","notifications_url":"https://api.github.com/repos/azakordonets/LoggingInterceptor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/azakordonets/LoggingInterceptor/labels{/name}","releases_url":"https://api.github.com/repos/azakordonets/LoggingInterceptor/releases{/id}","deployments_url":"https://api.github.com/repos/azakordonets/LoggingInterceptor/deployments","created_at":"2018-10-15T10:21:52Z","updated_at":"2018-11-07T18:42:14Z","pushed_at":"2018-11-07T18:42:11Z","git_url":"git://github.com/azakordonets/LoggingInterceptor.git","ssh_url":"git@github.com:azakordonets/LoggingInterceptor.git","clone_url":"https://github.com/azakordonets/LoggingInterceptor.git","svn_url":"https://github.com/azakordonets/LoggingInterceptor","homepage":"","size":17918,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dkorobtsov:master","ref":"master","sha":"44e0760738d5bc036dddd10cf96ae6192f024d46","user":{"login":"dkorobtsov","id":13999072,"node_id":"MDQ6VXNlcjEzOTk5MDcy","avatar_url":"https://avatars0.githubusercontent.com/u/13999072?v=4","gravatar_id":"","url":"https://api.github.com/users/dkorobtsov","html_url":"https://github.com/dkorobtsov","followers_url":"https://api.github.com/users/dkorobtsov/followers","following_url":"https://api.github.com/users/dkorobtsov/following{/other_user}","gists_url":"https://api.github.com/users/dkorobtsov/gists{/gist_id}","starred_url":"https://api.github.com/users/dkorobtsov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkorobtsov/subscriptions","organizations_url":"https://api.github.com/users/dkorobtsov/orgs","repos_url":"https://api.github.com/users/dkorobtsov/repos","events_url":"https://api.github.com/users/dkorobtsov/events{/privacy}","received_events_url":"https://api.github.com/users/dkorobtsov/received_events","type":"User","site_admin":false},"repo":{"id":140930608,"node_id":"MDEwOlJlcG9zaXRvcnkxNDA5MzA2MDg=","name":"LoggingInterceptor","full_name":"dkorobtsov/LoggingInterceptor","private":false,"owner":{"login":"dkorobtsov","id":13999072,"node_id":"MDQ6VXNlcjEzOTk5MDcy","avatar_url":"https://avatars0.githubusercontent.com/u/13999072?v=4","gravatar_id":"","url":"https://api.github.com/users/dkorobtsov","html_url":"https://github.com/dkorobtsov","followers_url":"https://api.github.com/users/dkorobtsov/followers","following_url":"https://api.github.com/users/dkorobtsov/following{/other_user}","gists_url":"https://api.github.com/users/dkorobtsov/gists{/gist_id}","starred_url":"https://api.github.com/users/dkorobtsov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkorobtsov/subscriptions","organizations_url":"https://api.github.com/users/dkorobtsov/orgs","repos_url":"https://api.github.com/users/dkorobtsov/repos","events_url":"https://api.github.com/users/dkorobtsov/events{/privacy}","received_events_url":"https://api.github.com/users/dkorobtsov/received_events","type":"User","site_admin":false},"html_url":"https://github.com/dkorobtsov/LoggingInterceptor","description":"An OkHttp/OkHttp3 interceptor for pretty logging request and response data. Works with all Java loggers - jul, log4j, slf4j, logback, log4j2 etc. Formats json and xml bodies.","fork":false,"url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor","forks_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/forks","keys_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/teams","hooks_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/hooks","issue_events_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/issues/events{/number}","events_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/events","assignees_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/assignees{/user}","branches_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/branches{/branch}","tags_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/tags","blobs_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/git/refs{/sha}","trees_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/statuses/{sha}","languages_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/languages","stargazers_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/stargazers","contributors_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/contributors","subscribers_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/subscribers","subscription_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/subscription","commits_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/commits{/sha}","git_commits_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/git/commits{/sha}","comments_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/comments{/number}","issue_comment_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/issues/comments{/number}","contents_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/contents/{+path}","compare_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/merges","archive_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/downloads","issues_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/issues{/number}","pulls_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/pulls{/number}","milestones_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/milestones{/number}","notifications_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/labels{/name}","releases_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/releases{/id}","deployments_url":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/deployments","created_at":"2018-07-14T08:41:13Z","updated_at":"2018-10-27T14:51:23Z","pushed_at":"2018-10-26T13:17:10Z","git_url":"git://github.com/dkorobtsov/LoggingInterceptor.git","ssh_url":"git@github.com:dkorobtsov/LoggingInterceptor.git","clone_url":"https://github.com/dkorobtsov/LoggingInterceptor.git","svn_url":"https://github.com/dkorobtsov/LoggingInterceptor","homepage":"","size":17934,"stargazers_count":6,"watchers_count":6,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":1,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/pulls/4"},"html":{"href":"https://github.com/dkorobtsov/LoggingInterceptor/pull/4"},"issue":{"href":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/issues/4"},"comments":{"href":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/dkorobtsov/LoggingInterceptor/statuses/0f7654302491513e5f5197e843cfb0de9cea170d"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":2,"additions":1866,"deletions":1091,"changed_files":28}}
{"actor":{"display_login":"azakordonets"}}