public class EncoderConfig extends Object
| 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.
|
String |
defaultContentCharset() |
EncoderConfig |
defaultContentCharset(String charset) |
String |
defaultQueryParameterCharset() |
EncoderConfig |
defaultQueryParameterCharset(String charset) |
static EncoderConfig |
encoderConfig() |
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 defaultQueryParameterCharset(String charset)
public static EncoderConfig encoderConfig()
public EncoderConfig and()
Copyright © 2010–2014. All rights reserved.