Interface HttpCompressionStrategy

All Superinterfaces:
Toggleable

public interface HttpCompressionStrategy extends 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 Type
    Method
    Description
    default 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)