Class ResponsePatternRule


  • public class ResponsePatternRule
    extends PatternRule
    Sends the response code whenever the rule finds a match.
    • Constructor Detail

      • ResponsePatternRule

        public ResponsePatternRule()
      • ResponsePatternRule

        public ResponsePatternRule​(@Name("pattern")
                                   String pattern,
                                   @Name("code")
                                   String code,
                                   @Name("reason")
                                   String reason)
    • Method Detail

      • setCode

        public void setCode​(String code)
        Sets the response status code.
        Parameters:
        code - response code
      • setReason

        public void setReason​(String reason)
        Sets the reason for the response status code. Reasons will only reflect if the code value is greater or equal to 400.
        Parameters:
        reason - the reason