Package | Description |
---|---|
org.springframework.http.codec | |
org.springframework.http.codec.json |
JSON encoder and decoder support.
|
org.springframework.http.server.reactive |
Abstractions for reactive HTTP server support including a
ServerHttpRequest and
ServerHttpResponse along with an
HttpHandler for processing. |
org.springframework.mock.http.server.reactive |
Mock implementations of reactive HTTP server contracts.
|
org.springframework.mock.web.reactive.function.server |
Mock objects for the functional web framework.
|
org.springframework.web.cors.reactive |
Reactive support for CORS (Cross-Origin Resource Sharing),
based on a common
CorsProcessor strategy. |
org.springframework.web.reactive.function |
Provides a foundation for both the reactive client and server subpackages.
|
org.springframework.web.reactive.function.server |
Provides the types that make up Spring's functional web framework for Reactive environments.
|
org.springframework.web.reactive.function.server.support |
Classes supporting the
org.springframework.web.reactive.function.server package. |
org.springframework.web.reactive.result.view |
Support for result handling through view resolution.
|
org.springframework.web.server |
Core interfaces and classes for Spring's generic, reactive web support.
|
org.springframework.web.server.adapter |
Implementations to adapt to the underlying
org.springframework.http.client.reactive reactive HTTP adapter
and HttpHandler . |
Modifier and Type | Method and Description |
---|---|
Map<String,Object> |
HttpMessageDecoder.getDecodeHints(ResolvableType actualType,
ResolvableType elementType,
ServerHttpRequest request,
ServerHttpResponse response)
Get decoding hints based on the server request or annotations on the
target controller method parameter.
|
default Map<String,Object> |
HttpMessageEncoder.getEncodeHints(ResolvableType actualType,
ResolvableType elementType,
MediaType mediaType,
ServerHttpRequest request,
ServerHttpResponse response)
Get decoding hints based on the server request or annotations on the
target controller method parameter.
|
protected Map<String,Object> |
DecoderHttpMessageReader.getReadHints(ResolvableType actualType,
ResolvableType elementType,
ServerHttpRequest request,
ServerHttpResponse response)
Get additional hints for decoding for example based on the server request
or annotations from controller method parameters.
|
protected Map<String,Object> |
ResourceHttpMessageReader.getReadHints(ResolvableType actualType,
ResolvableType elementType,
ServerHttpRequest request,
ServerHttpResponse response) |
protected Map<String,Object> |
EncoderHttpMessageWriter.getWriteHints(ResolvableType streamType,
ResolvableType elementType,
MediaType mediaType,
ServerHttpRequest request,
ServerHttpResponse response)
Get additional hints for encoding for example based on the server request
or annotations from controller method parameters.
|
reactor.core.publisher.Flux<T> |
DecoderHttpMessageReader.read(ResolvableType actualType,
ResolvableType elementType,
ServerHttpRequest request,
ServerHttpResponse response,
Map<String,Object> hints) |
default reactor.core.publisher.Flux<T> |
HttpMessageReader.read(ResolvableType actualType,
ResolvableType elementType,
ServerHttpRequest request,
ServerHttpResponse response,
Map<String,Object> hints)
Server-side only alternative to
HttpMessageReader.read(ResolvableType, ReactiveHttpInputMessage, Map)
with additional context available. |
reactor.core.publisher.Mono<T> |
DecoderHttpMessageReader.readMono(ResolvableType actualType,
ResolvableType elementType,
ServerHttpRequest request,
ServerHttpResponse response,
Map<String,Object> hints) |
default reactor.core.publisher.Mono<T> |
HttpMessageReader.readMono(ResolvableType actualType,
ResolvableType elementType,
ServerHttpRequest request,
ServerHttpResponse response,
Map<String,Object> hints)
Server-side only alternative to
HttpMessageReader.readMono(ResolvableType, ReactiveHttpInputMessage, Map)
with additional, context available. |
reactor.core.publisher.Mono<Void> |
ServerSentEventHttpMessageWriter.write(Publisher<?> input,
ResolvableType actualType,
ResolvableType elementType,
MediaType mediaType,
ServerHttpRequest request,
ServerHttpResponse response,
Map<String,Object> hints) |
reactor.core.publisher.Mono<Void> |
ResourceHttpMessageWriter.write(Publisher<? extends Resource> inputStream,
ResolvableType actualType,
ResolvableType elementType,
MediaType mediaType,
ServerHttpRequest request,
ServerHttpResponse response,
Map<String,Object> hints) |
reactor.core.publisher.Mono<Void> |
EncoderHttpMessageWriter.write(Publisher<? extends T> inputStream,
ResolvableType actualType,
ResolvableType elementType,
MediaType mediaType,
ServerHttpRequest request,
ServerHttpResponse response,
Map<String,Object> hints) |
default reactor.core.publisher.Mono<Void> |
HttpMessageWriter.write(Publisher<? extends T> inputStream,
ResolvableType actualType,
ResolvableType elementType,
MediaType mediaType,
ServerHttpRequest request,
ServerHttpResponse response,
Map<String,Object> hints)
Server-side only alternative to
HttpMessageWriter.write(Publisher, ResolvableType, MediaType, ReactiveHttpOutputMessage, Map)
with additional context available. |
Modifier and Type | Method and Description |
---|---|
Map<String,Object> |
AbstractJackson2Decoder.getDecodeHints(ResolvableType actualType,
ResolvableType elementType,
ServerHttpRequest request,
ServerHttpResponse response) |
Map<String,Object> |
AbstractJackson2Encoder.getEncodeHints(ResolvableType actualType,
ResolvableType elementType,
MediaType mediaType,
ServerHttpRequest request,
ServerHttpResponse response) |
Modifier and Type | Class and Description |
---|---|
class |
AbstractServerHttpRequest
Common base class for
ServerHttpRequest implementations. |
class |
ServerHttpRequestDecorator
Wraps another
ServerHttpRequest and delegates all methods to it. |
Modifier and Type | Method and Description |
---|---|
ServerHttpRequest |
ServerHttpRequest.Builder.build()
Build a
ServerHttpRequest decorator with the mutated properties. |
ServerHttpRequest |
ServerHttpRequestDecorator.getDelegate() |
Modifier and Type | Method and Description |
---|---|
static <T> T |
ServerHttpRequestDecorator.getNativeRequest(ServerHttpRequest request)
Return the native request of the underlying server API, if possible,
also unwrapping
ServerHttpRequestDecorator if necessary. |
reactor.core.publisher.Mono<Void> |
HttpHandler.handle(ServerHttpRequest request,
ServerHttpResponse response)
Handle the given request and write to the response.
|
reactor.core.publisher.Mono<Void> |
ContextPathCompositeHandler.handle(ServerHttpRequest request,
ServerHttpResponse response) |
Constructor and Description |
---|
ServerHttpRequestDecorator(ServerHttpRequest delegate) |
Modifier and Type | Class and Description |
---|---|
class |
MockServerHttpRequest
Mock extension of
AbstractServerHttpRequest for use in tests without
an actual server. |
Modifier and Type | Method and Description |
---|---|
<S> S |
MockServerRequest.body(BodyExtractor<S,? super ServerHttpRequest> extractor) |
<S> S |
MockServerRequest.body(BodyExtractor<S,? super ServerHttpRequest> extractor,
Map<String,Object> hints) |
Modifier and Type | Method and Description |
---|---|
static boolean |
CorsUtils.isCorsRequest(ServerHttpRequest request)
Returns
true if the request is a valid CORS one by checking Origin
header presence and ensuring that origins are different via CorsUtils.isSameOrigin(org.springframework.http.server.reactive.ServerHttpRequest) . |
static boolean |
CorsUtils.isPreFlightRequest(ServerHttpRequest request)
Returns
true if the request is a valid CORS pre-flight one by checking {code OPTIONS} method with
Origin and Access-Control-Request-Method headers presence. |
static boolean |
CorsUtils.isSameOrigin(ServerHttpRequest request)
Deprecated.
as of 5.2, same-origin checks are performed directly by
CorsUtils.isCorsRequest(org.springframework.http.server.reactive.ServerHttpRequest) |
Modifier and Type | Method and Description |
---|---|
Optional<ServerHttpRequest> |
BodyInserter.Context.serverRequest()
Optionally return the
ServerHttpRequest , if present. |
static BodyExtractor<reactor.core.publisher.Mono<MultiValueMap<String,Part>>,ServerHttpRequest> |
BodyExtractors.toMultipartData()
Extractor to read multipart data into a
MultiValueMap<String, Part> . |
static BodyExtractor<reactor.core.publisher.Flux<Part>,ServerHttpRequest> |
BodyExtractors.toParts()
Extractor to read multipart data into
Flux<Part> . |
Modifier and Type | Method and Description |
---|---|
<T> T |
ServerRequest.body(BodyExtractor<T,? super ServerHttpRequest> extractor)
Extract the body with the given
BodyExtractor . |
<T> T |
ServerRequest.body(BodyExtractor<T,? super ServerHttpRequest> extractor,
Map<String,Object> hints)
Extract the body with the given
BodyExtractor and hints. |
Modifier and Type | Method and Description |
---|---|
<T> T |
ServerRequestWrapper.body(BodyExtractor<T,? super ServerHttpRequest> extractor) |
<T> T |
ServerRequestWrapper.body(BodyExtractor<T,? super ServerHttpRequest> extractor,
Map<String,Object> hints) |
Modifier and Type | Method and Description |
---|---|
protected StringBuilder |
RedirectView.appendCurrentRequestQuery(String targetUrl,
ServerHttpRequest request)
Append the query of the current request to the target redirect URL.
|
Modifier and Type | Method and Description |
---|---|
ServerHttpRequest |
ServerWebExchange.getRequest()
Return the current HTTP request.
|
ServerHttpRequest |
ServerWebExchangeDecorator.getRequest() |
Modifier and Type | Method and Description |
---|---|
ServerWebExchange.Builder |
ServerWebExchange.Builder.request(ServerHttpRequest request)
Set the request to use especially when there is a need to override
ServerHttpRequest methods. |
Modifier and Type | Method and Description |
---|---|
ServerHttpRequest |
ForwardedHeaderTransformer.apply(ServerHttpRequest request)
Apply and remove, or remove Forwarded type headers.
|
ServerHttpRequest |
DefaultServerWebExchange.getRequest() |
Modifier and Type | Method and Description |
---|---|
ServerHttpRequest |
ForwardedHeaderTransformer.apply(ServerHttpRequest request)
Apply and remove, or remove Forwarded type headers.
|
protected ServerWebExchange |
HttpWebHandlerAdapter.createExchange(ServerHttpRequest request,
ServerHttpResponse response) |
protected String |
HttpWebHandlerAdapter.formatRequest(ServerHttpRequest request)
Format the request for logging purposes including HTTP method and URL.
|
reactor.core.publisher.Mono<Void> |
HttpWebHandlerAdapter.handle(ServerHttpRequest request,
ServerHttpResponse response) |
protected boolean |
ForwardedHeaderTransformer.hasForwardedHeaders(ServerHttpRequest request)
Whether the request has any Forwarded headers.
|
Constructor and Description |
---|
DefaultServerWebExchange(ServerHttpRequest request,
ServerHttpResponse response,
WebSessionManager sessionManager,
ServerCodecConfigurer codecConfigurer,
LocaleContextResolver localeContextResolver) |