I'm using io.quarkus:quarkus-rest-client-reactive:2.10.3.Final
to make a request like this:
@RegisterRestClient
interface QweatherRestClient {
@GET
@Path(value = "/warning/now")
fun getWarningNow(
@QueryParam(value = "key") key: String,
@QueryParam(value = "location") location: String
): GetWarningNowResponse
}
The server returns a response with gzip encoding, which makes jackson throw an exception:
Request failed: javax.ws.rs.ProcessingException: com.fasterxml.jackson.core.JsonParseException: Illegal character ((CTRL-CHAR, code 31)): only regular white space (\r, \n, \t) is allowed between tokens
I can see gzip file magic number (1f 8b) if use ByteArray as the return type, instead of an object in the sample code.
I found a question How to receive a GZIP response with RESTClient maybe related. io.quarkus:quarkus-rest-client
has GZIPDecodingInterceptor
while the reactive one doesn't have this. Are there any alternative ways to receive responses with gzip encoding using the reactive rest client?