class ModifyHeadersExamplePlugin implements Plugin {

    @Override
    public Eventual<LiveHttpResponse> intercept(LiveHttpRequest request, Chain chain) {
        /* the intercept method is where you can modify the request, modify the response and
         handle side-effects.

         Resource-intensive actions, such as external calls should be done in separate threads,
         otherwise you will block worker threads. Worker threads are shared by multiple channels, meaning
         that blocking a thread will also impact other customers.
        * */

        // Here is a simple example of modifying an incoming request.
        LiveHttpRequest newRequest = request.newBuilder()
                .header("myRequestHeader", config.requestHeaderValue())
                .build();

        return chain.proceed(newRequest).map(response ->
                // Here is a simple example of modifying an outgoing response.
                response.newBuilder()
                        .header("myResponseHeader", config.responseHeaderValue())
                        .build()
        );
    }

    public  ModifyHeadersExamplePlugin(ModifyHeadersExamplePluginConfig config);

}