接口 MockServerHttpRequest.BaseBuilder<B extends MockServerHttpRequest.BaseBuilder<B>>

    • 方法详细资料

      • queryParam

        B queryParam​(String name,
                     Object... values)
        Append the given query parameter to the existing query parameters. If no values are given, the resulting URI will contain the query parameter name only (i.e. ?foo instead of ?foo=bar).

        The provided query name and values will be encoded.

        参数:
        name - the query parameter name
        values - the query parameter values
        返回:
        this UriComponentsBuilder
      • queryParams

        B queryParams​(MultiValueMap<String,​String> params)
        Add the given query parameters and values. The provided query name and corresponding values will be encoded.
        参数:
        params - the params
        返回:
        this UriComponentsBuilder
      • sslInfo

        void sslInfo​(SslInfo sslInfo)
        Set SSL session information and certificates.
      • accept

        B accept​(MediaType... acceptableMediaTypes)
        Set the list of acceptable media types, as specified by the Accept header.
        参数:
        acceptableMediaTypes - the acceptable media types
      • acceptCharset

        B acceptCharset​(Charset... acceptableCharsets)
        Set the list of acceptable charsets, as specified by the Accept-Charset header.
        参数:
        acceptableCharsets - the acceptable charsets
      • acceptLanguageAsLocales

        B acceptLanguageAsLocales​(Locale... acceptableLocales)
        Set the list of acceptable locales, as specified by the Accept-Languages header.
        参数:
        acceptableLocales - the acceptable locales
      • ifModifiedSince

        B ifModifiedSince​(long ifModifiedSince)
        Set the value of the If-Modified-Since header.

        The date should be specified as the number of milliseconds since January 1, 1970 GMT.

        参数:
        ifModifiedSince - the new value of the header
      • ifUnmodifiedSince

        B ifUnmodifiedSince​(long ifUnmodifiedSince)
        Set the (new) value of the If-Unmodified-Since header.

        The date should be specified as the number of milliseconds since January 1, 1970 GMT.

        参数:
        ifUnmodifiedSince - the new value of the header
        另请参阅:
        HttpHeaders.setIfUnmodifiedSince(long)
      • ifNoneMatch

        B ifNoneMatch​(String... ifNoneMatches)
        Set the values of the If-None-Match header.
        参数:
        ifNoneMatches - the new value of the header