JSON which I am passing between my services is very large, so I decided to compress body using gzip. My first idea was to compress the body and then send compressed body as a byte array as below but It unfortunately doesn't work.
@RequestMapping(value = "/save", method = RequestMethod.POST)
public void save(@RequestBody byte[] bytesToDecode) {
...
}
Could you give me any tips, how to compress and decompress json while sending It from the one service to another? I'm using Spring Boot and SDR, I will also appreciate any other advices about json sending optimization.