In our application, we are making REST calls to the database and passing huge chunk of JSON data. We would like to compress the JSON so as to speed up the data transfer process.
LinkedHashMap<String, Object> mapObject;
mapObject = objectMapper.readValue(JsonPayLoad.toString(), new TypeReference<LinkedHashMap<String, Object>>()
{});
ResponseEntity<Object> responseEntity =
restTemplate.postForEntity(executeTxUrl, mapObject, Object.class, txId);
I don't think this can be achieved by simply setting some http header. I think it would require an explicit compression of the JSON.
Also, I think it can be tested through the application's http logs?
Please let me know if someone has done something similar.
Regards, Rahul