public abstract class ResponsePostProcessors extends Object
ResponsePostProcessors
.Modifier and Type | Method and Description |
---|---|
static ResponsePostProcessor |
maskLinks()
Returns a
ResponsePostProcessor that will update the content of the
response to mask any links that it contains. |
static ResponsePostProcessor |
maskLinksWith(String mask)
Returns a
ResponsePostProcessor that will update the content of the
response to mask any links that it contains. |
static ResponsePostProcessor |
prettyPrintContent()
Returns a
ResponsePostProcessor that will pretty print the content of the
response. |
static ResponsePostProcessor |
removeHeaders(String... headerNames)
Returns a
ResponsePostProcessor that will remove the headers with the given
headerNames from the response. |
static ResponsePostProcessor |
replacePattern(Pattern pattern,
String replacement)
Returns a
ResponsePostProcessor that will update the content of the
response by replacing any occurrences of the given pattern with the given
replacement . |
public static ResponsePostProcessor prettyPrintContent()
ResponsePostProcessor
that will pretty print the content of the
response.public static ResponsePostProcessor removeHeaders(String... headerNames)
ResponsePostProcessor
that will remove the headers with the given
headerNames
from the response.headerNames
- the name of the headers to removepublic static ResponsePostProcessor maskLinks()
ResponsePostProcessor
that will update the content of the
response to mask any links that it contains. Each link is masked my replacing its
href
with ...
.public static ResponsePostProcessor maskLinksWith(String mask)
ResponsePostProcessor
that will update the content of the
response to mask any links that it contains. Each link is masked my replacing its
href
with the given mask
.mask
- the mask to applypublic static ResponsePostProcessor replacePattern(Pattern pattern, String replacement)
ResponsePostProcessor
that will update the content of the
response by replacing any occurrences of the given pattern
with the given
replacement
.pattern
- the pattern to matchreplacement
- the replacement to apply