I am getting the following error getting a response of a post method via WebClient(org.springframework.web.reactive.function.client)
org.springframework.core.codec.DecodingException: JSON decoding error: Illegal character ((CTRL-CHAR, code 31)): only regular white space (\r, \n, \t) is allowed between tokens; nested exception is com.fasterxml.jackson.core.JsonParseException: Illegal character ((CTRL-CHAR, code 31)): only regular white space (\r, \n, \t) is allowed between tokens
at [Source: (io.netty.buffer.ByteBufInputStream); line: 1, column: 2]
at org.springframework.http.codec.json.AbstractJackson2Decoder.processException(AbstractJackson2Decoder.java:215)
Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: Ȁ
I have tried changing the headers of the request as under with failure :-
headers.put("Accept-Encoding", "gzip");
or
headers.put("Accept-Encoding", "identity");
Is it that webclient is unable to process the gzipped response for any reason!!
Thanks in advance!!