class Xs2aHttpLogSanitizer {

    public String sanitizeRequestBody(HttpEntity entity, String contentType) {
        if (contentType.startsWith(APPLICATION_JSON)) {
            try {
                return sanitizeStringifiedJsonBody(EntityUtils.toString(entity));
            } catch (Exception e) {
                logger.error("Can't parse request as json. It will be replaced with {}", REPLACEMENT);
            }

        }
        return REPLACEMENT;
    }

    public  Xs2aHttpLogSanitizer();

}