Package | Description |
---|---|
org.springframework.web.reactive.function.server |
Provides the types that make up Spring's functional web framework for Reactive environments.
|
Modifier and Type | Method and Description |
---|---|
static ServerResponse.BodyBuilder |
ServerResponse.accepted()
Create a builder with an 202 Accepted status.
|
static ServerResponse.BodyBuilder |
ServerResponse.badRequest()
Create a builder with a 400 Bad Request status.
|
ServerResponse.BodyBuilder |
ServerResponse.BodyBuilder.contentLength(long contentLength)
Set the length of the body in bytes, as specified by the
Content-Length header. |
ServerResponse.BodyBuilder |
ServerResponse.BodyBuilder.contentType(MediaType contentType)
Set the media type of the body, as specified by the
Content-Type header. |
static ServerResponse.BodyBuilder |
ServerResponse.created(URI location)
Create a new builder with a 201 Created status
and a location header set to the given URI.
|
static ServerResponse.BodyBuilder |
ServerResponse.from(ServerResponse other)
Create a builder with the status code and headers of the given response.
|
ServerResponse.BodyBuilder |
ServerResponse.BodyBuilder.hint(String key,
Object value)
Add a serialization hint like
Jackson2CodecSupport.JSON_VIEW_HINT
to customize how the body will be serialized. |
ServerResponse.BodyBuilder |
ServerResponse.BodyBuilder.hints(Consumer<Map<String,Object>> hintsConsumer)
Customize the serialization hints with the given consumer.
|
static ServerResponse.BodyBuilder |
ServerResponse.ok()
Create a builder with the status set to 200 OK.
|
static ServerResponse.BodyBuilder |
ServerResponse.permanentRedirect(URI location)
Create a builder with a 308 Permanent Redirect
status and a location header set to the given URI.
|
static ServerResponse.BodyBuilder |
ServerResponse.seeOther(URI location)
Create a builder with a 303 See Other
status and a location header set to the given URI.
|
static ServerResponse.BodyBuilder |
ServerResponse.status(HttpStatus status)
Create a builder with the given HTTP status.
|
static ServerResponse.BodyBuilder |
ServerResponse.status(int status)
Create a builder with the given HTTP status.
|
static ServerResponse.BodyBuilder |
ServerResponse.temporaryRedirect(URI location)
Create a builder with a 307 Temporary Redirect
status and a location header set to the given URI.
|
static ServerResponse.BodyBuilder |
ServerResponse.unprocessableEntity()
Create a builder with an
422 Unprocessable Entity status.
|