B
- the builder sub-classpublic static interface MockServerHttpRequest.BaseBuilder<B extends MockServerHttpRequest.BaseBuilder<B>>
Modifier and Type | Method and Description |
---|---|
B |
accept(MediaType... acceptableMediaTypes)
Set the list of acceptable media types, as
specified by the
Accept header. |
B |
acceptCharset(java.nio.charset.Charset... acceptableCharsets)
Set the list of acceptable charsets, as specified
by the
Accept-Charset header. |
B |
acceptLanguageAsLocales(java.util.Locale... acceptableLocales)
Set the list of acceptable locales, as specified
by the
Accept-Languages header. |
MockServerHttpRequest |
build()
Builds the request with no body.
|
B |
contextPath(java.lang.String contextPath)
Set the contextPath to return.
|
B |
cookie(HttpCookie... cookie)
Add one or more cookies.
|
B |
cookies(MultiValueMap<java.lang.String,HttpCookie> cookies)
Add the given cookies.
|
B |
header(java.lang.String headerName,
java.lang.String... headerValues)
Add the given, single header value under the given name.
|
B |
headers(MultiValueMap<java.lang.String,java.lang.String> headers)
Add the given header values.
|
B |
ifModifiedSince(long ifModifiedSince)
Set the value of the
If-Modified-Since header. |
B |
ifNoneMatch(java.lang.String... ifNoneMatches)
Set the values of the
If-None-Match header. |
B |
ifUnmodifiedSince(long ifUnmodifiedSince)
Set the (new) value of the
If-Unmodified-Since header. |
B |
range(HttpRange... ranges)
Set the (new) value of the Range header.
|
B |
remoteAddress(java.net.InetSocketAddress remoteAddress)
Set the remote address to return.
|
void |
sslInfo(SslInfo sslInfo)
Set SSL session information and certificates.
|
B contextPath(java.lang.String contextPath)
B remoteAddress(java.net.InetSocketAddress remoteAddress)
void sslInfo(SslInfo sslInfo)
B cookie(HttpCookie... cookie)
B cookies(MultiValueMap<java.lang.String,HttpCookie> cookies)
cookies
- the cookies.B header(java.lang.String headerName, java.lang.String... headerValues)
headerName
- the header nameheaderValues
- the header value(s)HttpHeaders.add(String, String)
B headers(MultiValueMap<java.lang.String,java.lang.String> headers)
headers
- the header valuesB accept(MediaType... acceptableMediaTypes)
Accept
header.acceptableMediaTypes
- the acceptable media typesB acceptCharset(java.nio.charset.Charset... acceptableCharsets)
Accept-Charset
header.acceptableCharsets
- the acceptable charsetsB acceptLanguageAsLocales(java.util.Locale... acceptableLocales)
Accept-Languages
header.acceptableLocales
- the acceptable localesB ifModifiedSince(long ifModifiedSince)
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 headerB ifUnmodifiedSince(long ifUnmodifiedSince)
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 headerHttpHeaders.setIfUnmodifiedSince(long)
B ifNoneMatch(java.lang.String... ifNoneMatches)
If-None-Match
header.ifNoneMatches
- the new value of the headerB range(HttpRange... ranges)
ranges
- the HTTP rangesHttpHeaders.setRange(List)
MockServerHttpRequest build()
MockServerHttpRequest.BodyBuilder.body(Publisher)
,
MockServerHttpRequest.BodyBuilder.body(String)