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

类型参数:
B - the builder sub-class
所有已知子接口:
MockServerHttpRequest.BodyBuilder
所有已知实现类:
MockServerHttpRequest.DefaultBodyBuilder
封闭类:
MockServerHttpRequest

public static interface MockServerHttpRequest.BaseBuilder<B extends MockServerHttpRequest.BaseBuilder<B>>
Request builder exposing properties not related to the body.
  • 方法概要

    修饰符和类型
    方法
    说明
    accept(cn.taketoday.http.MediaType... acceptableMediaTypes)
    Set the list of acceptable media types, as specified by the Accept header.
    acceptCharset(Charset... acceptableCharsets)
    Set the list of acceptable charsets, as specified by the Accept-Charset header.
    acceptLanguageAsLocales(Locale... acceptableLocales)
    Set the list of acceptable locales, as specified by the Accept-Languages header.
    Builds the request with no body.
    contextPath(String contextPath)
    Set the contextPath to return.
    cookie(cn.taketoday.http.HttpCookie... cookie)
    Add one or more cookies.
    cookies(cn.taketoday.util.MultiValueMap<String,cn.taketoday.http.HttpCookie> cookies)
    Add the given cookies.
    header(String headerName, String... headerValues)
    Add the given, single header value under the given name.
    headers(cn.taketoday.util.MultiValueMap<String,String> headers)
    Add the given header values.
    ifModifiedSince(long ifModifiedSince)
    Set the value of the If-Modified-Since header.
    ifNoneMatch(String... ifNoneMatches)
    Set the values of the If-None-Match header.
    ifUnmodifiedSince(long ifUnmodifiedSince)
    Set the (new) value of the If-Unmodified-Since header.
    Set the local address to return.
    queryParam(String name, Object... values)
    Append the given query parameter to the existing query parameters.
    queryParams(cn.taketoday.util.MultiValueMap<String,String> params)
    Add the given query parameters and values.
    range(cn.taketoday.http.HttpRange... ranges)
    Set the (new) value of the Range header.
    Set the remote address to return.
    void
    sslInfo(cn.taketoday.http.server.reactive.SslInfo sslInfo)
    Set SSL session information and certificates.
  • 方法详细资料

    • contextPath

      B contextPath(String contextPath)
      Set the contextPath to return.
    • 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(cn.taketoday.util.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
    • remoteAddress

      B remoteAddress(InetSocketAddress remoteAddress)
      Set the remote address to return.
    • localAddress

      B localAddress(InetSocketAddress localAddress)
      Set the local address to return.
      从以下版本开始:
      4.0
    • sslInfo

      void sslInfo(cn.taketoday.http.server.reactive.SslInfo sslInfo)
      Set SSL session information and certificates.
    • cookie

      B cookie(cn.taketoday.http.HttpCookie... cookie)
      Add one or more cookies.
    • cookies

      B cookies(cn.taketoday.util.MultiValueMap<String,cn.taketoday.http.HttpCookie> cookies)
      Add the given cookies.
      参数:
      cookies - the cookies.
    • header

      B header(String headerName, String... headerValues)
      Add the given, single header value under the given name.
      参数:
      headerName - the header name
      headerValues - the header value(s)
      另请参阅:
      • HttpHeaders.add(String, String)
    • headers

      B headers(cn.taketoday.util.MultiValueMap<String,String> headers)
      Add the given header values.
      参数:
      headers - the header values
    • accept

      B accept(cn.taketoday.http.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
    • range

      B range(cn.taketoday.http.HttpRange... ranges)
      Set the (new) value of the Range header.
      参数:
      ranges - the HTTP ranges
      另请参阅:
      • HttpHeaders.setRange(java.util.Collection<cn.taketoday.http.HttpRange>)
    • build

      Builds the request with no body.
      返回:
      the request
      另请参阅: