Class HttpRequestExample.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • method

        @Stability(Stable)
        public HttpRequestExample.Builder method​(Object method)
        Parameters:
        method - A string or string matcher that matches the method used for this example (eg "GET" or "POST"). This parameter is required. Case insensitive. Note that DELETE, GET and HEAD requests should not have bodies - see the HTTP RFCs for details.
        Returns:
        this
      • path

        @Stability(Stable)
        public HttpRequestExample.Builder path​(Object path)
        Parameters:
        path - A string or string matcher that matches the path of this example. This parameter is required. Note that any query parameters must be in the query, not in the path.
        Returns:
        this
      • headers

        @Stability(Stable)
        public HttpRequestExample.Builder headers​(Object headers)
        Parameters:
        headers - A Map of header names and associated test-equivalence matcher values accepted by this example. If not provided, no header matching is performed
        Returns:
        this
      • query

        @Stability(Stable)
        public HttpRequestExample.Builder query​(Object query)
        Parameters:
        query - A test-equivalence matcher for the query. Usually this is a Map of test-equivalence matchers to match the parsed query string, keyed by parameter name. Repeated parameters are collated and put in an array in this map.
        Returns:
        this