blacklist header logging code example
Example: blacklist header logging
Blacklist Headers from Logging
As of REST Assured 4.2.0 it's possible to blacklist
headers so that they are not shown in the request
or response log. Instead the header value will be
replaced with [ BLACKLISTED ]. You can enable this per
header basis using the LogConfig:
given().config(config().logConfig(logConfig().blacklistHeader("Accept"))). ..
The response log will the print:
Request method: GET
Request URI: http://localhost:8080/something
Proxy:
Request params:
Query params:
Form params:
Path params:
Headers: Accept=[ BLACKLISTED ]
Cookies:
Multiparts:
Body: