Class ContentEncodingRegistry

java.lang.Object
groovyx.net.http.ContentEncodingRegistry

public class ContentEncodingRegistry extends Object
Keeps track of available content-encoding handlers.
  • Field Details

  • Constructor Details

    • ContentEncodingRegistry

      public ContentEncodingRegistry()
  • Method Details

    • getDefaultEncoders

      protected Map<String,ContentEncoding> getDefaultEncoders()
      This implementation adds a GZIPEncoding and DeflateEncoding handler to the registry. Override this method to provide a different set of defaults.
      Returns:
      a map to content-encoding strings to ContentEncoding handlers.
    • setInterceptors

      void setInterceptors(org.apache.http.impl.client.AbstractHttpClient client, Object... encodings)
      Add the request and response interceptors to the HttpClient, which will provide transparent decoding of the given content-encoding types. This method is called by HTTPBuilder and probably should not need be modified by sub-classes.
      Parameters:
      client - client on which to set the request and response interceptors
      encodings - encoding name (either a ContentEncoding.Type or a content-encoding string.