Mani
07/26/2019, 7:53 PMCasey Brooks
07/26/2019, 7:58 PMMani
07/26/2019, 7:59 PMzpearce
07/26/2019, 8:01 PMFelipe Assoline
07/26/2019, 9:06 PMserver.compression.enabled: true
I always check built in features viewing this doc:
https://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.htmlMani
07/26/2019, 9:07 PMfun gzip(content: String): ByteArray {
val bos = ByteArrayOutputStream()
GZIPOutputStream(bos).bufferedWriter(UTF_8).use { it.write(content) }
return bos.toByteArray()
}
I used this piece of code. The response times are crazy.tipsy
07/26/2019, 10:49 PMGZIPOutputStream(res.outputStream, true).use { gzippedStream ->
content.copyTo(gzippedStream)
}