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) |
|
) |
|
); |
|
} |
|
|
Add support for
gzipanddeflateand enable this tests:jcabi-http/src/test/java/com/jcabi/http/RequestITCaseTemplate.java
Lines 180 to 195 in 9f069cf
jcabi-http/src/test/java/com/jcabi/http/RequestITCaseTemplate.java
Lines 197 to 213 in 9f069cf