@API(status=STABLE) public final class BodyFilters extends Object
| Modifier and Type | Method and Description |
|---|---|
static BodyFilter |
accessToken() |
static BodyFilter |
defaultValue() |
static BodyFilter |
replaceJsonStringProperty(Set<String> properties,
String replacement)
Creates a
BodyFilter that replaces the properties in the json response with the replacement passed as argument. |
static BodyFilter |
truncate(int maxSize) |
@API(status=MAINTAINED) public static BodyFilter defaultValue()
@API(status=MAINTAINED) public static BodyFilter accessToken()
@API(status=MAINTAINED) public static BodyFilter replaceJsonStringProperty(Set<String> properties, String replacement)
BodyFilter that replaces the properties in the json response with the replacement passed as argument.
This BodyFilter works on all levels inside the json tree and it only works with string valuesaccessToken() method:
Set<String> properties = new HashSet<>();
properties.add("access_token");
properties.add("open_id");
properties.add("id_token");
return replaceJsonStringProperty(properties, "XXX");
properties - JSON properties to replacereplacement - String to replace the properties values@API(status=EXPERIMENTAL) public static BodyFilter truncate(int maxSize)
Copyright © 2015–2018 Zalando SE. All rights reserved.