Package groovyx.net.http
Class ContentEncodingRegistry
- java.lang.Object
-
- groovyx.net.http.ContentEncodingRegistry
-
public class ContentEncodingRegistry extends java.lang.Object
Keeps track of available content-encoding handlers.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,ContentEncoding>
availableEncoders
-
Constructor Summary
Constructors Constructor Description ContentEncodingRegistry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Map<java.lang.String,ContentEncoding>
getDefaultEncoders()
This implementation adds aGZIPEncoding
andDeflateEncoding
handler to the registry.(package private) void
setInterceptors(org.apache.http.impl.client.AbstractHttpClient client, java.lang.Object... encodings)
Add the request and response interceptors to theHttpClient
, which will provide transparent decoding of the given content-encoding types.
-
-
-
Field Detail
-
availableEncoders
protected java.util.Map<java.lang.String,ContentEncoding> availableEncoders
-
-
Method Detail
-
getDefaultEncoders
protected java.util.Map<java.lang.String,ContentEncoding> 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
void setInterceptors(org.apache.http.impl.client.AbstractHttpClient client, java.lang.Object... encodings)
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.
-
-