Interface PathInterceptor


  • @Unstable
    public interface PathInterceptor
    Used to create interceptors to modify the request path.
    • Method Detail

      • changePath

        static ProxyInterceptor changePath​(Function<String,​String> pattern)
        Apply a callback to change the request URI when the proxy receives it.
        Parameters:
        pattern - the operation that applied to the path
        Returns:
        the created interceptor
      • removePrefix

        static ProxyInterceptor removePrefix​(String prefix)
        Add a prefix to the URI.
        Parameters:
        prefix - the prefix that need to be added
        Returns:
        the created interceptor
      • addPrefix

        static ProxyInterceptor addPrefix​(String prefix)
        Remove a prefix to the URI. Do nothing if it doesn't exist.
        Parameters:
        prefix - the prefix that need to be removed
        Returns:
        the created interceptor