Skip to content

JdkRequest does not support compression  #258

@andreoss

Description

@andreoss

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)
)
);
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions