Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JdkRequest does not support compression #258

Open
andreoss opened this issue Jun 27, 2021 · 0 comments
Open

JdkRequest does not support compression #258

andreoss opened this issue Jun 27, 2021 · 0 comments

Comments

@andreoss
Copy link
Collaborator

Add support for gzip and deflate and enable this tests:

@Test
@DisabledIf("isJdkRequest")
final void readsDeflatedJsonResponse() throws Exception {
MatcherAssert.assertThat(
"Must undeflate & parse Json response",
this.request("/deflate")
.fetch()
.as(JsonResponse.class)
.json()
.readObject(),
Matchers.hasEntry(
Matchers.is("deflated"),
Matchers.is(JsonValue.TRUE)
)
);
}

@Test
@DisabledIf("isJdkRequest")
final void readsGzippedJsonResponse() throws Exception {
MatcherAssert.assertThat(
"Must unzip & parse Json response",
this.request("/gzip")
.fetch()
.as(JsonResponse.class)
.json()
.readObject(),
Matchers.hasEntry(
Matchers.is("gzipped"),
Matchers.is(JsonValue.TRUE)
)
);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants