Package io.micronaut.http.server.netty
Interface HttpCompressionStrategy
- All Superinterfaces:
Toggleable
Determines if a given http message should be compressed. It should
be assumed the client allows for compressed responses.
- Since:
- 1.2.0
- Author:
- James Kleeh
-
Method Summary
Modifier and TypeMethodDescriptiondefault int
boolean
shouldCompress
(io.netty.handler.codec.http.HttpResponse response) Methods inherited from interface io.micronaut.core.util.Toggleable
isEnabled
-
Method Details
-
shouldCompress
boolean shouldCompress(io.netty.handler.codec.http.HttpResponse response) - Parameters:
response
- The HTTP response- Returns:
- True if the response should be compressed
-
getCompressionLevel
default int getCompressionLevel()- Returns:
- The compression level (0-9)
-