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.
since:
5.0
Author:
Rossen stoyanchev
  • Method Details

    • contextPath

      B&nbsp;contextPath(string&nbsp;contextPath)
      set the contextPath to return.
    • queryParam

      B&nbsp;queryParam(string&nbsp;name, Object...&nbsp;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.

      Parameters:
      name - the query parameter name
      values - the query parameter values
      Returns:
      this UriComponentsBuilder
    • queryParams

      B&nbsp;queryParams(MultiValueMap<string,string>&nbsp;params)
      Add the given query parameters and values. The provided query name and corresponding values will be encoded.
      Parameters:
      params - the params
      Returns:
      this UriComponentsBuilder
    • remoteAddress

      B&nbsp;remoteAddress(InetsocketAddress&nbsp;remoteAddress)
      set the remote address to return.
    • localAddress

      B&nbsp;localAddress(InetsocketAddress&nbsp;localAddress)
      set the local address to return.
      since:
      5.2.3
    • sslInfo

      B&nbsp;sslInfo(sslInfo&nbsp;sslInfo)
      set ssL session information and certificates.
    • cookie

      B&nbsp;cookie(HttpCookie...&nbsp;cookie)
      Add one or more cookies.
    • cookies

      B&nbsp;cookies(MultiValueMap<string, HttpCookie>&nbsp;cookies)
      Add the given cookies.
      Parameters:
      cookies - the cookies.
    • header

      B&nbsp;header(string&nbsp;headerName, string...&nbsp;headerValues)
      Add the given, single header value under the given name.
      Parameters:
      headerName - the header name
      headerValues - the header value(s)
      see Also:
    • headers

      B&nbsp;headers(HttpHeaders&nbsp;headers)
      Add the given header values.
      Parameters:
      headers - the header values
    • accept

      B&nbsp;accept(MediaType...&nbsp;acceptableMediaTypes)
      set the list of acceptable media types, as specified by the Accept header.
      Parameters:
      acceptableMediaTypes - the acceptable media types
    • acceptCharset

      B&nbsp;acceptCharset(Charset...&nbsp;acceptableCharsets)
      set the list of acceptable charsets, as specified by the Accept-Charset header.
      Parameters:
      acceptableCharsets - the acceptable charsets
    • acceptLanguageAsLocales

      B&nbsp;acceptLanguageAsLocales(Locale...&nbsp;acceptableLocales)
      set the list of acceptable locales, as specified by the Accept-Languages header.
      Parameters:
      acceptableLocales - the acceptable locales
    • ifModifiedsince

      B&nbsp;ifModifiedsince(long&nbsp;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.

      Parameters:
      ifModifiedsince - the new value of the header
    • ifUnmodifiedsince

      B&nbsp;ifUnmodifiedsince(long&nbsp;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.

      Parameters:
      ifUnmodifiedsince - the new value of the header
      see Also:
    • ifNoneMatch

      B&nbsp;ifNoneMatch(string...&nbsp;ifNoneMatches)
      set the values of the If-None-Match header.
      Parameters:
      ifNoneMatches - the new value of the header
    • range

      B&nbsp;range(HttpRange...&nbsp;ranges)
      set the (new) value of the Range header.
      Parameters:
      ranges - the HTTP ranges
      see Also:
    • build

      Builds the request with no body.
      Returns:
      the request
      see Also: