@Override
    protected void doApply(ApiResponse response, IPolicyContext context, TransformationConfigBean config,
            IPolicyChain<ApiResponse> chain) {
        final DataFormat clientFormat = (DataFormat) context.getAttribute(CLIENT_FORMAT, null);
        final DataFormat serverFormat = (DataFormat) context.getAttribute(SERVER_FORMAT, null);

        if (isValidTransformation(clientFormat, serverFormat)) {
            response.getHeaders().put(CONTENT_TYPE, clientFormat.getContentType());
            response.getHeaders().remove(CONTENT_LENGTH);
        }

        super.doApply(response, context, config, chain);
    }
@see io.apiman.gateway.engine.policy.IDataPolicy#getRequestDataHandler(io.apiman.gateway.engine.beans.ApiRequest, io.apiman.gateway.engine.policy.IPolicyContext, java.lang.Object)
plugins/transformation-policy/src/main/java/io/apiman/plugins/transformation_policy/TransformationPolicy.java