public class DecoderConfig extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
DecoderConfig.ContentDecoder
Predefined content encoders in REST Assured.
|
| Constructor and Description |
|---|
DecoderConfig()
Configure the decoder config to use the default charset as specified by
Charset.defaultCharset() for content decoding. |
DecoderConfig(DecoderConfig.ContentDecoder contentDecoder,
DecoderConfig.ContentDecoder... additionalContentDecoders)
Configure the decoder config to use
Charset.defaultCharset() for content decoding. |
DecoderConfig(String defaultContentCharset)
Configure the decoder config to use supplied
defaultContentCharset for content decoding if a charset is not specified in the response. |
| Modifier and Type | Method and Description |
|---|---|
DecoderConfig |
and()
Syntactic sugar.
|
List<DecoderConfig.ContentDecoder> |
contentDecoders() |
DecoderConfig |
contentDecoders(DecoderConfig.ContentDecoder contentDecoder,
DecoderConfig.ContentDecoder... additionalContentDecoders)
Specify the content decoders that will be presented to the server when making a request (using the
Accept-Encoding header). |
static DecoderConfig |
decoderConfig() |
String |
defaultContentCharset() |
DecoderConfig |
defaultContentCharset(String charset)
Specify the default charset of the content in the response that's assumed if no charset is explicitly specified in the response.
|
DecoderConfig |
noContentDecoders()
Specify that no content decoders should be used by REST Assured.
|
boolean |
shouldUseNoWrapForInflateDecoding() |
DecoderConfig |
useNoWrapForInflateDecoding(boolean nowrap)
If the parameter 'nowrap' is true then the ZLIB header and checksum fields will not be used.
|
DecoderConfig |
with()
Syntactic sugar.
|
public DecoderConfig()
Charset.defaultCharset() for content decoding.public DecoderConfig(String defaultContentCharset)
defaultContentCharset for content decoding if a charset is not specified in the response.defaultContentCharset - The charset to use if not specifically specified in the response.public DecoderConfig(DecoderConfig.ContentDecoder contentDecoder, DecoderConfig.ContentDecoder... additionalContentDecoders)
Charset.defaultCharset() for content decoding.
Also specify the content decoders that will be presented to the server when making a request (using the Accept-Encoding header).
If the server supports any of these encodings then REST Assured will automatically perform decoding of the response accordingly.
By default DecoderConfig.ContentDecoder.GZIP and DecoderConfig.ContentDecoder.DEFLATE are used.
contentDecoder - The first content decoderadditionalContentDecoders - Optional additional content decoderspublic String defaultContentCharset()
public List<DecoderConfig.ContentDecoder> contentDecoders()
public DecoderConfig useNoWrapForInflateDecoding(boolean nowrap)
true is required when communicating with servers not using RFC 1950 (such as PHP which uses RFC 1951).
See stackoverflow for more details.
Default is .nowrap - if true then support GZIP compatible compressionpublic boolean shouldUseNoWrapForInflateDecoding()
true if no wrap should be used for inflate encoded streams.useNoWrapForInflateDecoding(boolean)public DecoderConfig defaultContentCharset(String charset)
charset - The expected charsetpublic DecoderConfig contentDecoders(DecoderConfig.ContentDecoder contentDecoder, DecoderConfig.ContentDecoder... additionalContentDecoders)
Accept-Encoding header).
If the server supports any of these encodings then REST Assured will automatically perform decoding of the response accordingly.
By default DecoderConfig.ContentDecoder.GZIP and DecoderConfig.ContentDecoder.DEFLATE are used.
contentDecoder - The first content decoderadditionalContentDecoders - Optional additional content decoderspublic DecoderConfig noContentDecoders()
contentDecoders(com.jayway.restassured.config.DecoderConfig.ContentDecoder, com.jayway.restassured.config.DecoderConfig.ContentDecoder...)public static DecoderConfig decoderConfig()
public DecoderConfig and()
public DecoderConfig with()
Copyright © 2010–2014. All rights reserved.