{"action":"created","comment":{"url":"https://api.github.com/repos/jcabi/jcabi-http/pulls/comments/75808336","id":75808336,"diff_hunk":"@@ -0,0 +1,72 @@\n+/**\n+ * Copyright (c) 2011-2015, jcabi.com\n+ * All rights reserved.\n+ *\n+ * Redistribution and use in source and binary forms, with or without\n+ * modification, are permitted provided that the following conditions\n+ * are met: 1) Redistributions of source code must retain the above\n+ * copyright notice, this list of conditions and the following\n+ * disclaimer. 2) Redistributions in binary form must reproduce the above\n+ * copyright notice, this list of conditions and the following\n+ * disclaimer in the documentation and/or other materials provided\n+ * with the distribution. 3) Neither the name of the jcabi.com nor\n+ * the names of its contributors may be used to endorse or promote\n+ * products derived from this software without specific prior written\n+ * permission.\n+ *\n+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+ * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT\n+ * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL\n+ * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n+ * OF THE POSSIBILITY OF SUCH DAMAGE.\n+ */\n+package com.jcabi.http.mock;\n+\n+import lombok.EqualsAndHashCode;\n+import lombok.ToString;\n+import org.hamcrest.Description;\n+import org.hamcrest.Matcher;\n+import org.hamcrest.TypeSafeMatcher;\n+\n+/**\n+ * Matcher for checking {@link MkAnswer#bodyBytes()} result.\n+ * @author Peter Storch (peter.storch@gmail.com)\n+ * @version $Id$\n+ */\n+@ToString\n+@EqualsAndHashCode(callSuper = false, of = \"matcher\")\n+final class MkAnswerBodyBytesMatcher extends TypeSafeMatcher<MkAnswer> {\n+    /**\n+     * The Matcher to use against the body.\n+     */\n+    private final transient Matcher<byte[]> matcher;\n+\n+    /**\n+     * Ctor.\n+     * @param match The matcher to use for the body\n+     */\n+    MkAnswerBodyBytesMatcher(final Matcher<byte[]> match) {\n+        super();\n+        this.matcher = match;\n+    }\n+\n+    @Override\n+    public void describeTo(final Description description) {\n+        this.matcher.describeTo(\n+            description.appendText(\"MkAnswer body matching: \")","path":"src/main/java/com/jcabi/http/mock/MkAnswerBodyBytesMatcher.java","position":null,"original_position":63,"commit_id":"dab111af9ce8c80c0e41ac442bc79baa046c3cd2","original_commit_id":"4b3b59e5b49e2b962acf387478a89d23b48a60cb","user":{"login":"pstorch","id":5598124,"avatar_url":"https://avatars.githubusercontent.com/u/5598124?v=3","gravatar_id":"","url":"https://api.github.com/users/pstorch","html_url":"https://github.com/pstorch","followers_url":"https://api.github.com/users/pstorch/followers","following_url":"https://api.github.com/users/pstorch/following{/other_user}","gists_url":"https://api.github.com/users/pstorch/gists{/gist_id}","starred_url":"https://api.github.com/users/pstorch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pstorch/subscriptions","organizations_url":"https://api.github.com/users/pstorch/orgs","repos_url":"https://api.github.com/users/pstorch/repos","events_url":"https://api.github.com/users/pstorch/events{/privacy}","received_events_url":"https://api.github.com/users/pstorch/received_events","type":"User","site_admin":false},"body":"I used the same `descripeTo()` as in `MkAnswerBodyMatcher`, which already existed.","created_at":"2016-08-23T06:23:20Z","updated_at":"2016-08-23T06:23:20Z","html_url":"https://github.com/jcabi/jcabi-http/pull/143#discussion_r75808336","pull_request_url":"https://api.github.com/repos/jcabi/jcabi-http/pulls/143","_links":{"self":{"href":"https://api.github.com/repos/jcabi/jcabi-http/pulls/comments/75808336"},"html":{"href":"https://github.com/jcabi/jcabi-http/pull/143#discussion_r75808336"},"pull_request":{"href":"https://api.github.com/repos/jcabi/jcabi-http/pulls/143"}}},"pull_request":{"url":"https://api.github.com/repos/jcabi/jcabi-http/pulls/143","id":82098829,"html_url":"https://github.com/jcabi/jcabi-http/pull/143","diff_url":"https://github.com/jcabi/jcabi-http/pull/143.diff","patch_url":"https://github.com/jcabi/jcabi-http/pull/143.patch","issue_url":"https://api.github.com/repos/jcabi/jcabi-http/issues/143","number":143,"state":"open","locked":false,"title":"fix #137 handling of byte[] body","user":{"login":"pstorch","id":5598124,"avatar_url":"https://avatars.githubusercontent.com/u/5598124?v=3","gravatar_id":"","url":"https://api.github.com/users/pstorch","html_url":"https://github.com/pstorch","followers_url":"https://api.github.com/users/pstorch/followers","following_url":"https://api.github.com/users/pstorch/following{/other_user}","gists_url":"https://api.github.com/users/pstorch/gists{/gist_id}","starred_url":"https://api.github.com/users/pstorch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pstorch/subscriptions","organizations_url":"https://api.github.com/users/pstorch/orgs","repos_url":"https://api.github.com/users/pstorch/repos","events_url":"https://api.github.com/users/pstorch/events{/privacy}","received_events_url":"https://api.github.com/users/pstorch/received_events","type":"User","site_admin":false},"body":"As #141 takes so long (and doesn't solve the issue), I can offer my solution to #137 here.","created_at":"2016-08-21T07:07:09Z","updated_at":"2016-08-23T06:23:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"88a295cdcff8acaf128c74d6f18a0536b8b1e16a","assignee":{"login":"mkordas","id":5467276,"avatar_url":"https://avatars.githubusercontent.com/u/5467276?v=3","gravatar_id":"","url":"https://api.github.com/users/mkordas","html_url":"https://github.com/mkordas","followers_url":"https://api.github.com/users/mkordas/followers","following_url":"https://api.github.com/users/mkordas/following{/other_user}","gists_url":"https://api.github.com/users/mkordas/gists{/gist_id}","starred_url":"https://api.github.com/users/mkordas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkordas/subscriptions","organizations_url":"https://api.github.com/users/mkordas/orgs","repos_url":"https://api.github.com/users/mkordas/repos","events_url":"https://api.github.com/users/mkordas/events{/privacy}","received_events_url":"https://api.github.com/users/mkordas/received_events","type":"User","site_admin":false},"assignees":[{"login":"mkordas","id":5467276,"avatar_url":"https://avatars.githubusercontent.com/u/5467276?v=3","gravatar_id":"","url":"https://api.github.com/users/mkordas","html_url":"https://github.com/mkordas","followers_url":"https://api.github.com/users/mkordas/followers","following_url":"https://api.github.com/users/mkordas/following{/other_user}","gists_url":"https://api.github.com/users/mkordas/gists{/gist_id}","starred_url":"https://api.github.com/users/mkordas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkordas/subscriptions","organizations_url":"https://api.github.com/users/mkordas/orgs","repos_url":"https://api.github.com/users/mkordas/repos","events_url":"https://api.github.com/users/mkordas/events{/privacy}","received_events_url":"https://api.github.com/users/mkordas/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/jcabi/jcabi-http/pulls/143/commits","review_comments_url":"https://api.github.com/repos/jcabi/jcabi-http/pulls/143/comments","review_comment_url":"https://api.github.com/repos/jcabi/jcabi-http/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jcabi/jcabi-http/issues/143/comments","statuses_url":"https://api.github.com/repos/jcabi/jcabi-http/statuses/dab111af9ce8c80c0e41ac442bc79baa046c3cd2","head":{"label":"pstorch:137","ref":"137","sha":"dab111af9ce8c80c0e41ac442bc79baa046c3cd2","user":{"login":"pstorch","id":5598124,"avatar_url":"https://avatars.githubusercontent.com/u/5598124?v=3","gravatar_id":"","url":"https://api.github.com/users/pstorch","html_url":"https://github.com/pstorch","followers_url":"https://api.github.com/users/pstorch/followers","following_url":"https://api.github.com/users/pstorch/following{/other_user}","gists_url":"https://api.github.com/users/pstorch/gists{/gist_id}","starred_url":"https://api.github.com/users/pstorch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pstorch/subscriptions","organizations_url":"https://api.github.com/users/pstorch/orgs","repos_url":"https://api.github.com/users/pstorch/repos","events_url":"https://api.github.com/users/pstorch/events{/privacy}","received_events_url":"https://api.github.com/users/pstorch/received_events","type":"User","site_admin":false},"repo":{"id":62170754,"name":"jcabi-http","full_name":"pstorch/jcabi-http","owner":{"login":"pstorch","id":5598124,"avatar_url":"https://avatars.githubusercontent.com/u/5598124?v=3","gravatar_id":"","url":"https://api.github.com/users/pstorch","html_url":"https://github.com/pstorch","followers_url":"https://api.github.com/users/pstorch/followers","following_url":"https://api.github.com/users/pstorch/following{/other_user}","gists_url":"https://api.github.com/users/pstorch/gists{/gist_id}","starred_url":"https://api.github.com/users/pstorch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pstorch/subscriptions","organizations_url":"https://api.github.com/users/pstorch/orgs","repos_url":"https://api.github.com/users/pstorch/repos","events_url":"https://api.github.com/users/pstorch/events{/privacy}","received_events_url":"https://api.github.com/users/pstorch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pstorch/jcabi-http","description":"Fluent Java HTTP client","fork":true,"url":"https://api.github.com/repos/pstorch/jcabi-http","forks_url":"https://api.github.com/repos/pstorch/jcabi-http/forks","keys_url":"https://api.github.com/repos/pstorch/jcabi-http/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pstorch/jcabi-http/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pstorch/jcabi-http/teams","hooks_url":"https://api.github.com/repos/pstorch/jcabi-http/hooks","issue_events_url":"https://api.github.com/repos/pstorch/jcabi-http/issues/events{/number}","events_url":"https://api.github.com/repos/pstorch/jcabi-http/events","assignees_url":"https://api.github.com/repos/pstorch/jcabi-http/assignees{/user}","branches_url":"https://api.github.com/repos/pstorch/jcabi-http/branches{/branch}","tags_url":"https://api.github.com/repos/pstorch/jcabi-http/tags","blobs_url":"https://api.github.com/repos/pstorch/jcabi-http/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pstorch/jcabi-http/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pstorch/jcabi-http/git/refs{/sha}","trees_url":"https://api.github.com/repos/pstorch/jcabi-http/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pstorch/jcabi-http/statuses/{sha}","languages_url":"https://api.github.com/repos/pstorch/jcabi-http/languages","stargazers_url":"https://api.github.com/repos/pstorch/jcabi-http/stargazers","contributors_url":"https://api.github.com/repos/pstorch/jcabi-http/contributors","subscribers_url":"https://api.github.com/repos/pstorch/jcabi-http/subscribers","subscription_url":"https://api.github.com/repos/pstorch/jcabi-http/subscription","commits_url":"https://api.github.com/repos/pstorch/jcabi-http/commits{/sha}","git_commits_url":"https://api.github.com/repos/pstorch/jcabi-http/git/commits{/sha}","comments_url":"https://api.github.com/repos/pstorch/jcabi-http/comments{/number}","issue_comment_url":"https://api.github.com/repos/pstorch/jcabi-http/issues/comments{/number}","contents_url":"https://api.github.com/repos/pstorch/jcabi-http/contents/{+path}","compare_url":"https://api.github.com/repos/pstorch/jcabi-http/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pstorch/jcabi-http/merges","archive_url":"https://api.github.com/repos/pstorch/jcabi-http/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pstorch/jcabi-http/downloads","issues_url":"https://api.github.com/repos/pstorch/jcabi-http/issues{/number}","pulls_url":"https://api.github.com/repos/pstorch/jcabi-http/pulls{/number}","milestones_url":"https://api.github.com/repos/pstorch/jcabi-http/milestones{/number}","notifications_url":"https://api.github.com/repos/pstorch/jcabi-http/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pstorch/jcabi-http/labels{/name}","releases_url":"https://api.github.com/repos/pstorch/jcabi-http/releases{/id}","deployments_url":"https://api.github.com/repos/pstorch/jcabi-http/deployments","created_at":"2016-06-28T20:07:42Z","updated_at":"2016-06-28T20:07:43Z","pushed_at":"2016-08-23T06:19:30Z","git_url":"git://github.com/pstorch/jcabi-http.git","ssh_url":"git@github.com:pstorch/jcabi-http.git","clone_url":"https://github.com/pstorch/jcabi-http.git","svn_url":"https://github.com/pstorch/jcabi-http","homepage":"http.jcabi.com","size":6425,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"jcabi:master","ref":"master","sha":"a2d8764394a79ee7b6bd4858e08586951fc458a0","user":{"login":"jcabi","id":5272640,"avatar_url":"https://avatars.githubusercontent.com/u/5272640?v=3","gravatar_id":"","url":"https://api.github.com/users/jcabi","html_url":"https://github.com/jcabi","followers_url":"https://api.github.com/users/jcabi/followers","following_url":"https://api.github.com/users/jcabi/following{/other_user}","gists_url":"https://api.github.com/users/jcabi/gists{/gist_id}","starred_url":"https://api.github.com/users/jcabi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcabi/subscriptions","organizations_url":"https://api.github.com/users/jcabi/orgs","repos_url":"https://api.github.com/users/jcabi/repos","events_url":"https://api.github.com/users/jcabi/events{/privacy}","received_events_url":"https://api.github.com/users/jcabi/received_events","type":"Organization","site_admin":false},"repo":{"id":16312153,"name":"jcabi-http","full_name":"jcabi/jcabi-http","owner":{"login":"jcabi","id":5272640,"avatar_url":"https://avatars.githubusercontent.com/u/5272640?v=3","gravatar_id":"","url":"https://api.github.com/users/jcabi","html_url":"https://github.com/jcabi","followers_url":"https://api.github.com/users/jcabi/followers","following_url":"https://api.github.com/users/jcabi/following{/other_user}","gists_url":"https://api.github.com/users/jcabi/gists{/gist_id}","starred_url":"https://api.github.com/users/jcabi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcabi/subscriptions","organizations_url":"https://api.github.com/users/jcabi/orgs","repos_url":"https://api.github.com/users/jcabi/repos","events_url":"https://api.github.com/users/jcabi/events{/privacy}","received_events_url":"https://api.github.com/users/jcabi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jcabi/jcabi-http","description":"Fluent Java HTTP client","fork":false,"url":"https://api.github.com/repos/jcabi/jcabi-http","forks_url":"https://api.github.com/repos/jcabi/jcabi-http/forks","keys_url":"https://api.github.com/repos/jcabi/jcabi-http/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jcabi/jcabi-http/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jcabi/jcabi-http/teams","hooks_url":"https://api.github.com/repos/jcabi/jcabi-http/hooks","issue_events_url":"https://api.github.com/repos/jcabi/jcabi-http/issues/events{/number}","events_url":"https://api.github.com/repos/jcabi/jcabi-http/events","assignees_url":"https://api.github.com/repos/jcabi/jcabi-http/assignees{/user}","branches_url":"https://api.github.com/repos/jcabi/jcabi-http/branches{/branch}","tags_url":"https://api.github.com/repos/jcabi/jcabi-http/tags","blobs_url":"https://api.github.com/repos/jcabi/jcabi-http/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jcabi/jcabi-http/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jcabi/jcabi-http/git/refs{/sha}","trees_url":"https://api.github.com/repos/jcabi/jcabi-http/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jcabi/jcabi-http/statuses/{sha}","languages_url":"https://api.github.com/repos/jcabi/jcabi-http/languages","stargazers_url":"https://api.github.com/repos/jcabi/jcabi-http/stargazers","contributors_url":"https://api.github.com/repos/jcabi/jcabi-http/contributors","subscribers_url":"https://api.github.com/repos/jcabi/jcabi-http/subscribers","subscription_url":"https://api.github.com/repos/jcabi/jcabi-http/subscription","commits_url":"https://api.github.com/repos/jcabi/jcabi-http/commits{/sha}","git_commits_url":"https://api.github.com/repos/jcabi/jcabi-http/git/commits{/sha}","comments_url":"https://api.github.com/repos/jcabi/jcabi-http/comments{/number}","issue_comment_url":"https://api.github.com/repos/jcabi/jcabi-http/issues/comments{/number}","contents_url":"https://api.github.com/repos/jcabi/jcabi-http/contents/{+path}","compare_url":"https://api.github.com/repos/jcabi/jcabi-http/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jcabi/jcabi-http/merges","archive_url":"https://api.github.com/repos/jcabi/jcabi-http/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jcabi/jcabi-http/downloads","issues_url":"https://api.github.com/repos/jcabi/jcabi-http/issues{/number}","pulls_url":"https://api.github.com/repos/jcabi/jcabi-http/pulls{/number}","milestones_url":"https://api.github.com/repos/jcabi/jcabi-http/milestones{/number}","notifications_url":"https://api.github.com/repos/jcabi/jcabi-http/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jcabi/jcabi-http/labels{/name}","releases_url":"https://api.github.com/repos/jcabi/jcabi-http/releases{/id}","deployments_url":"https://api.github.com/repos/jcabi/jcabi-http/deployments","created_at":"2014-01-28T13:12:40Z","updated_at":"2016-07-29T20:37:25Z","pushed_at":"2016-08-23T06:19:31Z","git_url":"git://github.com/jcabi/jcabi-http.git","ssh_url":"git@github.com:jcabi/jcabi-http.git","clone_url":"https://github.com/jcabi/jcabi-http.git","svn_url":"https://github.com/jcabi/jcabi-http","homepage":"http.jcabi.com","size":6484,"stargazers_count":75,"watchers_count":75,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":32,"mirror_url":null,"open_issues_count":23,"forks":32,"open_issues":23,"watchers":75,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jcabi/jcabi-http/pulls/143"},"html":{"href":"https://github.com/jcabi/jcabi-http/pull/143"},"issue":{"href":"https://api.github.com/repos/jcabi/jcabi-http/issues/143"},"comments":{"href":"https://api.github.com/repos/jcabi/jcabi-http/issues/143/comments"},"review_comments":{"href":"https://api.github.com/repos/jcabi/jcabi-http/pulls/143/comments"},"review_comment":{"href":"https://api.github.com/repos/jcabi/jcabi-http/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jcabi/jcabi-http/pulls/143/commits"},"statuses":{"href":"https://api.github.com/repos/jcabi/jcabi-http/statuses/dab111af9ce8c80c0e41ac442bc79baa046c3cd2"}}}}
{"actor":{"display_login":"pstorch"}}