Class PathRequestMatcher

    • Constructor Detail

      • PathRequestMatcher

        protected PathRequestMatcher​(org.hamcrest.Matcher<? super String> pred)
        Protected constructor useful only when subtyping. For creating instances of this class use requestPath(org.hamcrest.Matcher) instead.
        Parameters:
        pred - a predicate to be applied on the request path
    • Method Detail

      • requestPath

        public static PathRequestMatcher requestPath​(org.hamcrest.Matcher<? super String> pred)
        Factory method to create new instance of this matcher.
        Parameters:
        pred - a predicate to be applied on the request path
        Returns:
        new instance of this matcher
      • retrieveValue

        public String retrieveValue​(Request req)
        Retrieves the path of the given request. The value is percent-encoded.
        Specified by:
        retrieveValue in class RequestMatcher<String>
        Parameters:
        req - request to retrieve the path from
        Returns:
        request path (never returns null)