Package groovyx.net.http
Class ContentEncodingRegistry
java.lang.Object
groovyx.net.http.ContentEncodingRegistry
Keeps track of available content-encoding handlers.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Map
<String, ContentEncoding> This implementation adds aGZIPEncoding
andDeflateEncoding
handler to the registry.(package private) void
setInterceptors
(org.apache.http.impl.client.AbstractHttpClient client, Object... encodings) Add the request and response interceptors to theHttpClient
, which will provide transparent decoding of the given content-encoding types.
-
Field Details
-
availableEncoders
-
-
Constructor Details
-
ContentEncodingRegistry
public ContentEncodingRegistry()
-
-
Method Details
-
getDefaultEncoders
This implementation adds aGZIPEncoding
andDeflateEncoding
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
Add the request and response interceptors to theHttpClient
, 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 interceptorsencodings
- encoding name (either aContentEncoding.Type
or acontent-encoding
string.
-