org.springframework.http.server.reactive

## Interface ServerHttpRequest.Builder

- Enclosing interface:
    ServerHttpRequest

      public static interface ServerHttpRequest.Builder

  Builder for mutating an existing `ServerHttpRequest`.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `ServerHttpRequest` | `build()` Build a `ServerHttpRequest` decorator with the mutated properties.
    `ServerHttpRequest.Builder` | `contextPath(String contextPath)` Set the contextPath to use.
    `ServerHttpRequest.Builder` | `header(String headerName, String... headerValues)` Set or override the specified header values under the given name.
    `ServerHttpRequest.Builder` | `headers(Consumer<HttpHeaders> headersConsumer)` Manipulate request headers.
    `ServerHttpRequest.Builder` | `method(HttpMethod httpMethod)` Set the HTTP method to return.
    `ServerHttpRequest.Builder` | `path(String path)` Set the path to use instead of the `"rawPath"` of the URI of the request with the following conditions: If `uri` is also set, the path given here overrides the path of the given URI.
    `ServerHttpRequest.Builder` | `remoteAddress(InetSocketAddress remoteAddress)` Set the address of the remote client.
    `ServerHttpRequest.Builder` | `sslInfo(SslInfo sslInfo)` Set the SSL session information.
    `ServerHttpRequest.Builder` | `uri(URI uri)` Set the URI to use with the following conditions: If `path` is also set, it overrides the path of the URI provided here.

- - ### Method Detail

    - #### method

          ServerHttpRequest.Builder method(HttpMethod httpMethod)

      Set the HTTP method to return.

    - #### uri

          ServerHttpRequest.Builder uri(URI uri)

      Set the URI to use with the following conditions:
      - If `path` is also set, it overrides the path of the URI provided here.
      - If `contextPath` is also set, or already present, it must match the start of the path of the URI provided here.

    - #### path

          ServerHttpRequest.Builder path(String path)

      Set the path to use instead of the `"rawPath"` of the URI of the request with the following conditions:
      - If `uri` is also set, the path given here overrides the path of the given URI.
      - If `contextPath` is also set, or already present, it must match the start of the path given here.
      - The given value must begin with a slash.

    - #### contextPath

          ServerHttpRequest.Builder contextPath(String contextPath)

      Set the contextPath to use.

      The given value must be a valid `contextPath` and it must match the start of the path of the URI of the request. That means changing the contextPath, implies also changing the path via `path(String)`.

    - #### header

          ServerHttpRequest.Builder header(String headerName,
                                           String... headerValues)

      Set or override the specified header values under the given name.

      If you need to add header values, remove headers, etc., use `headers(Consumer)` for greater control.

      Parameters:
        `headerName` - the header name
        `headerValues` - the header values
      Since:
        5.1.9
      See Also:
        `headers(Consumer)`

    - #### headers

          ServerHttpRequest.Builder headers(Consumer<HttpHeaders> headersConsumer)

      Manipulate request headers. The provided `HttpHeaders` contains current request headers, so that the `Consumer` can overwrite or remove existing values, or use any other `HttpHeaders` methods.
      See Also:
        `header(String, String...)`

    - #### sslInfo

          ServerHttpRequest.Builder sslInfo(SslInfo sslInfo)

      Set the SSL session information. This may be useful in environments where TLS termination is done at the router, but SSL information is made available in some other way such as through a header.
      Since:
        5.0.7

    - #### remoteAddress

          ServerHttpRequest.Builder remoteAddress(InetSocketAddress remoteAddress)

      Set the address of the remote client.
      Since:
        5.3

    - #### build

          ServerHttpRequest build()

      Build a `ServerHttpRequest` decorator with the mutated properties.