Class ResponseContentProcessor

    • Constructor Detail

      • ResponseContentProcessor

        public ResponseContentProcessor​(java.lang.String contentPattern,
                                        java.lang.String replacement)
        Creates a new ResponseContentProcessor object.
        Parameters:
        contentPattern - a regex specifying the piece of content to be replaced
        replacement - the replacement string
      • ResponseContentProcessor

        public ResponseContentProcessor​(java.lang.String contentPattern,
                                        java.lang.String replacement,
                                        java.lang.String urlPattern)
        Creates a new ResponseContentProcessor object.
        Parameters:
        contentPattern - a regex specifying the piece of content to be replaced
        replacement - the replacement string
        urlPattern - a regex specifying the URL(s) for which to apply the replacement
      • ResponseContentProcessor

        public ResponseContentProcessor​(java.util.regex.Pattern contentPattern,
                                        java.lang.String replacement)
        Creates a new ResponseContentProcessor object.
        Parameters:
        contentPattern - a regex specifying the piece of content to be replaced
        replacement - the replacement string
      • ResponseContentProcessor

        public ResponseContentProcessor​(java.util.regex.Pattern contentPattern,
                                        java.lang.String replacement,
                                        java.util.regex.Pattern urlPattern)
        Creates a new ResponseContentProcessor object.
        Parameters:
        contentPattern - a regex specifying the piece of content to be replaced
        replacement - the replacement string
        urlPattern - a regex specifying the URL(s) for which to apply the replacement
    • Method Detail

      • processResponse

        public WebResponse processResponse​(WebResponse webResponse)
        Processes the content of a response.
        Parameters:
        webResponse - the web response to modify
        Returns:
        the (potentially) modified web response