io.vertx.httpproxy.interceptors.BodyTransformer Maven / Gradle / Ivy
package io.vertx.httpproxy.interceptors;
import io.vertx.codegen.annotations.Unstable;
import io.vertx.codegen.annotations.VertxGen;
import io.vertx.core.buffer.Buffer;
import io.vertx.core.json.JsonArray;
import io.vertx.core.json.JsonObject;
import io.vertx.httpproxy.interceptors.impl.BodyTransformerImpl;
import java.util.function.Function;
/**
* The callback to transform the request or response body.
*/
@VertxGen
@Unstable
public interface BodyTransformer extends Function {
/**
* Create a callback for transform JsonObject.
*
* @param transformer the operation to transform data
* @return the built callback
*/
static BodyTransformer transformJsonObject(Function transformer) {
return BodyTransformerImpl.transformJsonObject(transformer);
}
/**
* Create a callback for transform JsonArray.
*
* @param transformer the operation to transform data
* @return the built callback
*/
static BodyTransformer transformJsonArray(Function transformer) {
return BodyTransformerImpl.transformJsonArray(transformer);
}
/**
* Create a callback for transform json with unknown shape.
*
* @param transformer the operation to transform data
* @return the built callback
*/
static BodyTransformer transformJson(Function
© 2015 - 2025 Weber Informatics LLC | Privacy Policy