spring-framework / org.springframework.web.reactive.function.server.support / ServerRequestWrapper

ServerRequestWrapper

open class ServerRequestWrapper : ServerRequest

Implementation of the ServerRequest interface that can be subclassed to adapt the request to a HandlerFunction. All methods default to calling through to the wrapped request.

Author
Arjen Poutsma

Since
5.0

Constructors

<init>

ServerRequestWrapper(delegate: ServerRequest)

Create a new RequestWrapper that wraps the given request.

Functions

attribute

open fun attribute(name: String): Optional<Any>

attributes

open fun attributes(): MutableMap<String, Any>

body

open fun <T : Any> body(extractor: BodyExtractor<T, in ServerHttpRequest>): T
open fun <T : Any> body(extractor: BodyExtractor<T, in ServerHttpRequest>, hints: MutableMap<String, Any>): T

bodyToFlux

open fun <T : Any> bodyToFlux(elementClass: Class<out T>): Flux<T>
open fun <T : Any> bodyToFlux(typeReference: ParameterizedTypeReference<T>): Flux<T>

bodyToMono

open fun <T : Any> bodyToMono(elementClass: Class<out T>): Mono<T>
open fun <T : Any> bodyToMono(typeReference: ParameterizedTypeReference<T>): Mono<T>

cookies

open fun cookies(): MultiValueMap<String, HttpCookie>

headers

open fun headers(): Headers

method

open fun method(): HttpMethod

methodName

open fun methodName(): String

path

open fun path(): String

pathContainer

open fun pathContainer(): PathContainer

pathVariable

open fun pathVariable(name: String): String

pathVariables

open fun pathVariables(): MutableMap<String, String>

principal

open fun principal(): Mono<out Principal>

queryParam

open fun queryParam(name: String): Optional<String>

queryParams

open fun queryParams(): MultiValueMap<String, String>

request

open fun request(): ServerRequest

Return the wrapped request.

session

open fun session(): Mono<WebSession>

uri

open fun uri(): URI

uriBuilder

open fun uriBuilder(): UriBuilder