| Constructor and Description |
|---|
EncoderConfig()
Configure the encoder config to use "ISO-8859-1" for content encoding and
UTF-8. |
EncoderConfig(String defaultContentCharset,
String defaultQueryParameterCharset) |
| Modifier and Type | Method and Description |
|---|---|
EncoderConfig |
and()
Syntactic sugar.
|
EncoderConfig |
appendDefaultContentCharsetToContentTypeIfUndefined(boolean shouldAddDefaultContentCharsetToContentTypeIfMissing)
Tells whether REST Assured should automatically append the content charset to the content-type header if not defined explicitly.
|
EncoderConfig |
appendDefaultContentCharsetToStreamingContentTypeIfUndefined(boolean shouldAddDefaultContentCharsetToContentTypeIfMissing)
Deprecated.
|
String |
defaultContentCharset() |
EncoderConfig |
defaultContentCharset(Charset charset) |
EncoderConfig |
defaultContentCharset(String charset) |
String |
defaultQueryParameterCharset() |
EncoderConfig |
defaultQueryParameterCharset(Charset charset) |
EncoderConfig |
defaultQueryParameterCharset(String charset) |
static EncoderConfig |
encoderConfig() |
boolean |
isUserConfigured() |
boolean |
shouldAppendDefaultContentCharsetToContentTypeIfUndefined()
Tells whether REST Assured should automatically append the content charset to the content-type header if not defined explicitly.
|
public EncoderConfig()
UTF-8.
for query parameter encoding.
The reason for choosing UTF-8 as default for query parameters even though US-ASCII is standard according to the URI Syntax specification is that it's nowadays recommended by w3 to use UTF-8. Different web servers seem to take different approaches though, for example Jetty uses UTF-8 as default but Tomcat uses US-ASCII. Since REST Assured is a test framework first and Jetty is more popular for testing REST Assured uses UTF-8.
public String defaultContentCharset()
public String defaultQueryParameterCharset()
public EncoderConfig defaultContentCharset(String charset)
public EncoderConfig defaultContentCharset(Charset charset)
public EncoderConfig defaultQueryParameterCharset(String charset)
public EncoderConfig defaultQueryParameterCharset(Charset charset)
public EncoderConfig appendDefaultContentCharsetToContentTypeIfUndefined(boolean shouldAddDefaultContentCharsetToContentTypeIfMissing)
Note that this does not affect multipart form data.
Default is true.
shouldAddDefaultContentCharsetToContentTypeIfMissing - Whether REST Assured should automatically append the content charset to the content-type header if not defined explicitly.EncoderConfig instance@Deprecated public EncoderConfig appendDefaultContentCharsetToStreamingContentTypeIfUndefined(boolean shouldAddDefaultContentCharsetToContentTypeIfMissing)
appendDefaultContentCharsetToContentTypeIfUndefined(boolean) instead.shouldAddDefaultContentCharsetToContentTypeIfMissing - Whether REST Assured should automatically append the content charset to the content-type header if not defined explicitly.EncoderConfig instancepublic boolean shouldAppendDefaultContentCharsetToContentTypeIfUndefined()
Note that this does not affect multipart form data.
true if REST Assured should automatically append the content charset to the content-type header if not defined explicitly.public static EncoderConfig encoderConfig()
public EncoderConfig and()
public boolean isUserConfigured()
isUserConfigured in interface Configtrue if this config instance has been explicitly configured by the user, false if it has the default values.Copyright © 2010–2014. All rights reserved.