use of com.hotels.styx.common.format.HttpMessageFormatter in project styx by ExpediaGroup.
the class NettyToStyxRequestDecoderTest method decode.
private LiveHttpRequest decode(HttpRequest request) {
HttpRequestRecorder requestRecorder = new HttpRequestRecorder();
HttpMessageFormatter formatter = new SanitisedHttpMessageFormatter(new SanitisedHttpHeaderFormatter(Arrays.asList("secret-header"), Arrays.asList("secret-cookie")));
EmbeddedChannel channel = new EmbeddedChannel(new NettyToStyxRequestDecoder.Builder().uniqueIdSupplier(uniqueIdSupplier).httpMessageFormatter(formatter).build(), requestRecorder);
channel.writeInbound(request);
return requestRecorder.styxRequest;
}
Aggregations