Package org.springframework.web.reactive.function.server

Types

CoRouterFunctionDsl
Link copied to clipboard
class CoRouterFunctionDsl
Provide a WebFlux.
RouterFunctionDsl
Link copied to clipboard
class RouterFunctionDsl
Provide a WebFlux.

Functions

attributeOrNull
Link copied to clipboard
fun ServerRequest.attributeOrNull(name: String): Any?
Nullable variant of ServerRequest.attribute
awaitBody
Link copied to clipboard
inline suspend fun <T : Any> ServerRequest.awaitBody(): T
Non-nullable Coroutines variant of ServerRequest.bodyToMono.
suspend fun <T : Any> ServerRequest.awaitBody(clazz: KClass<T>): T
KClass non-nullable Coroutines variant of ServerRequest.bodyToMono.
awaitBodyOrNull
Link copied to clipboard
inline suspend fun <T : Any> ServerRequest.awaitBodyOrNull(): T?
Nullable Coroutines variant of ServerRequest.bodyToMono.
suspend fun <T : Any> ServerRequest.awaitBodyOrNull(clazz: KClass<T>): T?
KClass nullable Coroutines variant of ServerRequest.bodyToMono.
awaitFormData
Link copied to clipboard
suspend fun ServerRequest.awaitFormData(): MultiValueMap<String, String>
Coroutines variant of ServerRequest.formData.
awaitMultipartData
Link copied to clipboard
suspend fun ServerRequest.awaitMultipartData(): MultiValueMap<String, Part>
Coroutines variant of ServerRequest.multipartData.
awaitPrincipal
Link copied to clipboard
suspend fun ServerRequest.awaitPrincipal(): Principal?
Coroutines variant of ServerRequest.principal.
awaitSession
Link copied to clipboard
suspend fun ServerRequest.awaitSession(): WebSession
Coroutines variant of ServerRequest.session.
body
Link copied to clipboard
inline fun <T : Any> ServerResponse.BodyBuilder.body(producer: Any): Mono<ServerResponse>
Extension for ServerResponse.BodyBuilder.body providing a body<T>(Any) variant leveraging Kotlin reified type parameters.
inline fun <T : Any> ServerResponse.BodyBuilder.body(publisher: Publisher<T>): Mono<ServerResponse>
Extension for ServerResponse.BodyBuilder.body providing a body(Publisher<T>) variant.
bodyAndAwait
Link copied to clipboard
inline suspend fun <T : Any> ServerResponse.BodyBuilder.bodyAndAwait(flow: Flow<T>): ServerResponse
Coroutines variant of ServerResponse.BodyBuilder.body with Any and ParameterizedTypeReference parameters providing a bodyAndAwait(Flow<T>) variant.
bodyToFlow
Link copied to clipboard
inline fun <T : Any> ServerRequest.bodyToFlow(): Flow<T>
fun <T : Any> ServerRequest.bodyToFlow(clazz: KClass<T>): Flow<T>
KClass coroutines kotlinx.coroutines.flow.Flow based variant of ServerRequest.bodyToFlux.
bodyToFlux
Link copied to clipboard
inline fun <T : Any> ServerRequest.bodyToFlux(): Flux<T>
Extension for ServerRequest.bodyToFlux providing a bodyToFlux<Foo>() variant leveraging Kotlin reified type parameters.
bodyToMono
Link copied to clipboard
inline fun <T : Any> ServerRequest.bodyToMono(): Mono<T>
Extension for ServerRequest.bodyToMono providing a bodyToMono<Foo>() variant leveraging Kotlin reified type parameters.
bodyToServerSentEvents
Link copied to clipboard
inline fun <T : Any> ServerResponse.BodyBuilder.bodyToServerSentEvents(publisher: Publisher<T>): Mono<ServerResponse>
Extension for ServerResponse.BodyBuilder.body providing a bodyToServerSentEvents(Publisher<T>) variant.
bodyValueAndAwait
Link copied to clipboard
suspend fun ServerResponse.BodyBuilder.bodyValueAndAwait(body: Any): ServerResponse
buildAndAwait
Link copied to clipboard
suspend fun RenderingResponse.Builder.buildAndAwait(): RenderingResponse
Coroutines variant of RenderingResponse.Builder.build.
contentLengthOrNull
Link copied to clipboard
fun ServerRequest.Headers.contentLengthOrNull(): Long?
contentTypeOrNull
Link copied to clipboard
fun ServerRequest.Headers.contentTypeOrNull(): MediaType?
coRouter
Link copied to clipboard
fun coRouter(routes: CoRouterFunctionDsl.() -> Unit): RouterFunction<ServerResponse>
Allow to create easily a WebFlux.
html
Link copied to clipboard
Shortcut for setting MediaType.TEXT_HTMLContent-Type header.
json
Link copied to clipboard
Shortcut for setting MediaType.APPLICATION_JSONContent-Type header.
plus
Link copied to clipboard
operator fun <T : ServerResponse> RouterFunction<T>.plus(other: RouterFunction<T>): RouterFunction<T>
Equivalent to RouterFunction.and.
queryParamOrNull
Link copied to clipboard
fun ServerRequest.queryParamOrNull(name: String): String?
Nullable variant of ServerRequest.queryParam
remoteAddressOrNull
Link copied to clipboard
fun ServerRequest.remoteAddressOrNull(): InetSocketAddress?
Nullable variant of ServerRequest.remoteAddress
renderAndAwait
Link copied to clipboard
suspend fun ServerResponse.BodyBuilder.renderAndAwait(name: String, vararg modelAttributes: String): ServerResponse
Coroutines variant of ServerResponse.BodyBuilder.render.
suspend fun ServerResponse.BodyBuilder.renderAndAwait(name: String, model: Map<String, *>): ServerResponse
Coroutines variant of ServerResponse.BodyBuilder.render.
router
Link copied to clipboard
fun router(routes: RouterFunctionDsl.() -> Unit): RouterFunction<ServerResponse>
Allow to create easily a WebFlux.
sse
Link copied to clipboard
Shortcut for setting MediaType.TEXT_EVENT_STREAMContent-Type header.
xml
Link copied to clipboard
Shortcut for setting MediaType.APPLICATION_XMLContent-Type header.