接口 MockServerHttpRequest.BaseBuilder<B extends MockServerHttpRequest.BaseBuilder<B>>
- 类型参数:
B- the builder sub-class
- 所有已知子接口:
MockServerHttpRequest.BodyBuilder
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 theAcceptheader.acceptCharset(Charset... acceptableCharsets) Set the list of acceptable charsets, as specified by theAccept-Charsetheader.acceptLanguageAsLocales(Locale... acceptableLocales) Set the list of acceptable locales, as specified by theAccept-Languagesheader.build()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.Add the given cookies.Add the given, single header value under the given name.Add the given header values.ifModifiedSince(long ifModifiedSince) Set the value of theIf-Modified-Sinceheader.ifNoneMatch(String... ifNoneMatches) Set the values of theIf-None-Matchheader.ifUnmodifiedSince(long ifUnmodifiedSince) Set the (new) value of theIf-Unmodified-Sinceheader.localAddress(InetSocketAddress localAddress) 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.remoteAddress(InetSocketAddress remoteAddress) Set the remote address to return.voidsslInfo(cn.taketoday.http.server.reactive.SslInfo sslInfo) Set SSL session information and certificates.
-
方法详细资料
-
contextPath
Set the contextPath to return. -
queryParam
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.?fooinstead of?foo=bar).The provided query name and values will be encoded.
- 参数:
name- the query parameter namevalues- the query parameter values- 返回:
- this UriComponentsBuilder
-
queryParams
Add the given query parameters and values. The provided query name and corresponding values will be encoded.- 参数:
params- the params- 返回:
- this UriComponentsBuilder
-
remoteAddress
Set the remote address to return. -
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
Add one or more cookies. -
cookies
Add the given cookies.- 参数:
cookies- the cookies.
-
header
Add the given, single header value under the given name.- 参数:
headerName- the header nameheaderValues- the header value(s)- 另请参阅:
-
HttpHeaders.add(String, String)
-
headers
Add the given header values.- 参数:
headers- the header values
-
accept
Set the list of acceptable media types, as specified by theAcceptheader.- 参数:
acceptableMediaTypes- the acceptable media types
-
acceptCharset
Set the list of acceptable charsets, as specified by theAccept-Charsetheader.- 参数:
acceptableCharsets- the acceptable charsets
-
acceptLanguageAsLocales
Set the list of acceptable locales, as specified by theAccept-Languagesheader.- 参数:
acceptableLocales- the acceptable locales
-
ifModifiedSince
Set the value of theIf-Modified-Sinceheader.The date should be specified as the number of milliseconds since January 1, 1970 GMT.
- 参数:
ifModifiedSince- the new value of the header
-
ifUnmodifiedSince
Set the (new) value of theIf-Unmodified-Sinceheader.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
Set the values of theIf-None-Matchheader.- 参数:
ifNoneMatches- the new value of the header
-
range
Set the (new) value of the Range header.- 参数:
ranges- the HTTP ranges- 另请参阅:
-
HttpHeaders.setRange(java.util.Collection<cn.taketoday.http.HttpRange>)
-
build
MockServerHttpRequest build()Builds the request with no body.
-