Interface BodyInterceptor


  • @Unstable
    public interface BodyInterceptor
    Used to create interceptors to modify request and response bodies.
    • Method Detail

      • modifyBody

        static ProxyInterceptor modifyBody​(BodyTransformer requestTransformer,
                                           BodyTransformer responseTransformer)
        Apply callbacks to change the request and response bodies when the proxy receives them.
        Parameters:
        requestTransformer - the operation to apply to the request body
        responseTransformer - the operation to apply to the response body
        Returns:
        the created interceptor
      • modifyRequestBody

        static ProxyInterceptor modifyRequestBody​(BodyTransformer requestTransformer)
        Apply callbacks to change the request body when the proxy receives it.
        Parameters:
        requestTransformer - the operation to apply to the request body
        Returns:
        the created interceptor
      • modifyResponseBody

        static ProxyInterceptor modifyResponseBody​(BodyTransformer responseTransformer)
        Apply callbacks to change the response body when the proxy receives it.
        Parameters:
        responseTransformer - the operation to apply to the response body
        Returns:
        the created interceptor