Interface MockServerHttpRequest.BaseBuilder<B extends MockServerHttpRequest.BaseBuilder<B>>
- Type Parameters:
- B- the builder subclass
- All Known Subinterfaces:
- MockServerHttpRequest.BodyBuilder
- Enclosing class:
- MockServerHttpRequest
public static interface MockServerHttpRequest.BaseBuilder<B extends MockServerHttpRequest.BaseBuilder<B>>
Request builder exposing properties not related to the body.
- 
Method SummaryModifier and TypeMethodDescriptionSet 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(HttpCookie... cookie) Add one or more cookies.cookies(MultiValueMap<String, HttpCookie> cookies) Add the given cookies.Add the given, single header value under the given name.headers(HttpHeaders headers) 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(MultiValueMap<String, String> params) Add the given query parameters and values.Set the (new) value of the Range header.remoteAddress(InetSocketAddress remoteAddress) Set the remote address to return.voidSet SSL session information and certificates.
- 
Method Details- 
contextPathSet the contextPath to return.
- 
queryParamAppend 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. - Parameters:
- name- the query parameter name
- values- the query parameter values
- Returns:
- this UriComponentsBuilder
 
- 
queryParamsAdd the given query parameters and values. The provided query name and corresponding values will be encoded.- Parameters:
- params- the params
- Returns:
- this UriComponentsBuilder
 
- 
remoteAddressSet the remote address to return.
- 
localAddressSet the local address to return.- Since:
- 5.2.3
 
- 
sslInfoSet SSL session information and certificates.
- 
cookieAdd one or more cookies.
- 
cookiesAdd the given cookies.- Parameters:
- cookies- the cookies.
 
- 
headerAdd the given, single header value under the given name.- Parameters:
- headerName- the header name
- headerValues- the header value(s)
- See Also:
 
- 
headersAdd the given header values.- Parameters:
- headers- the header values
 
- 
acceptSet the list of acceptable media types, as specified by theAcceptheader.- Parameters:
- acceptableMediaTypes- the acceptable media types
 
- 
acceptCharsetSet the list of acceptable charsets, as specified by theAccept-Charsetheader.- Parameters:
- acceptableCharsets- the acceptable charsets
 
- 
acceptLanguageAsLocalesSet the list of acceptable locales, as specified by theAccept-Languagesheader.- Parameters:
- acceptableLocales- the acceptable locales
 
- 
ifModifiedSinceSet the value of theIf-Modified-Sinceheader.The date should be specified as the number of milliseconds since January 1, 1970 GMT. - Parameters:
- ifModifiedSince- the new value of the header
 
- 
ifUnmodifiedSinceSet the (new) value of theIf-Unmodified-Sinceheader.The date should be specified as the number of milliseconds since January 1, 1970 GMT. - Parameters:
- ifUnmodifiedSince- the new value of the header
- See Also:
 
- 
ifNoneMatchSet the values of theIf-None-Matchheader.- Parameters:
- ifNoneMatches- the new value of the header
 
- 
rangeSet the (new) value of the Range header.- Parameters:
- ranges- the HTTP ranges
- See Also:
 
- 
buildMockServerHttpRequest build()Builds the request with no body.- Returns:
- the request
- See Also:
 
 
-