# Uses of Interface
org.springframework.web.servlet.function.ServerRequest

Packages that use ServerRequest
Package
Description
org.springframework.web.servlet.function
Provides the types that make up Spring's functional web framework for Servlet environments.

## Uses of ServerRequest in org.springframework.web.servlet.function

Methods in org.springframework.web.servlet.function that return ServerRequest
Modifier and Type
Method
Description
`ServerRequest`
ServerRequest.Builder.`build()`
Build the request.
`static ServerRequest`
ServerRequest.`create(HttpServletRequest servletRequest, List<org.springframework.http.converter.HttpMessageConverter<?>> messageReaders)`
Create a new `ServerRequest` based on the given `HttpServletRequest` and message converters.
Methods in org.springframework.web.servlet.function that return types with arguments of type ServerRequest
Modifier and Type
Method
Description
`default Optional<ServerRequest>`
RequestPredicate.`nest(ServerRequest request)`
Transform the given request into a request used for a nested route.
`static Function<ServerRequest,Optional<org.springframework.core.io.Resource>>`
RouterFunctions.`resourceLookupFunction(String pattern, org.springframework.core.io.Resource location)`
Returns the resource lookup function used by `RouterFunctions.resources(String, Resource)`.
Methods in org.springframework.web.servlet.function with parameters of type ServerRequest
Modifier and Type
Method
Description
`R`
HandlerFilterFunction.`filter(ServerRequest request, HandlerFunction<T> next)`
Apply this filter to the given handler function.
`static ServerRequest.Builder`
ServerRequest.`from(ServerRequest other)`
Create a builder with the status, headers, and cookies of the given request.
`T`
HandlerFunction.`handle(ServerRequest request)`
Handle the given request.
`default Optional<ServerRequest>`
RequestPredicate.`nest(ServerRequest request)`
Transform the given request into a request used for a nested route.
`Optional<HandlerFunction<T>>`
RouterFunction.`route(ServerRequest request)`
Return the handler function that matches the given request.
`boolean`
RequestPredicate.`test(ServerRequest request)`
Evaluate this predicate on the given request.
Method parameters in org.springframework.web.servlet.function with type arguments of type ServerRequest
Modifier and Type
Method
Description
`RouterFunctions.Builder`
RouterFunctions.Builder.`after(BiFunction<ServerRequest,ServerResponse,ServerResponse> responseProcessor)`
Filter the response object for all routes created by this builder with the given response processing function.
`RouterFunctions.Builder`
RouterFunctions.Builder.`before(Function<ServerRequest,ServerRequest> requestProcessor)`
Filter the request object for all routes created by this builder with the given request processing function.
`RouterFunctions.Builder`
RouterFunctions.Builder.`before(Function<ServerRequest,ServerRequest> requestProcessor)`
Filter the request object for all routes created by this builder with the given request processing function.
`static <T extends ServerResponse>
HandlerFilterFunction<T,T>`
HandlerFilterFunction.`ofErrorHandler(Predicate<Throwable> predicate, BiFunction<Throwable,ServerRequest,T> errorHandler)`
Adapt the given predicate and response provider function to a filter function that returns a `ServerResponse` on a given exception.
`static <T extends ServerResponse>
HandlerFilterFunction<T,T>`
HandlerFilterFunction.`ofRequestProcessor(Function<ServerRequest,ServerRequest> requestProcessor)`
Adapt the given request processor function to a filter function that only operates on the `ServerRequest`.
`static <T extends ServerResponse>
HandlerFilterFunction<T,T>`
HandlerFilterFunction.`ofRequestProcessor(Function<ServerRequest,ServerRequest> requestProcessor)`
Adapt the given request processor function to a filter function that only operates on the `ServerRequest`.
`static <T extends ServerResponse, R extends ServerResponse>
HandlerFilterFunction<T,R>`
HandlerFilterFunction.`ofResponseProcessor(BiFunction<ServerRequest,T,R> responseProcessor)`
Adapt the given response processor function to a filter function that only operates on the `ServerResponse`.
`RouterFunctions.Builder`
RouterFunctions.Builder.`onError(Class<? extends Throwable> exceptionType, BiFunction<Throwable,ServerRequest,ServerResponse> responseProvider)`
Filters all exceptions of the given type by applying the given response provider function.
`RouterFunctions.Builder`
RouterFunctions.Builder.`onError(Predicate<Throwable> predicate, BiFunction<Throwable,ServerRequest,ServerResponse> responseProvider)`
Filters all exceptions that match the predicate by applying the given response provider function.
`RouterFunctions.Builder`
RouterFunctions.Builder.`resources(Function<ServerRequest,Optional<org.springframework.core.io.Resource>> lookupFunction)`
Route to resources using the provided lookup function.
`RouterFunctions.Builder`
RouterFunctions.Builder.`resources(Function<ServerRequest,Optional<org.springframework.core.io.Resource>> lookupFunction, BiConsumer<org.springframework.core.io.Resource,org.springframework.http.HttpHeaders> headersConsumer)`
Route to resources using the provided lookup function.
`static RouterFunction<ServerResponse>`
RouterFunctions.`resources(Function<ServerRequest,Optional<org.springframework.core.io.Resource>> lookupFunction)`
Route to resources using the provided lookup function.
`static RouterFunction<ServerResponse>`
RouterFunctions.`resources(Function<ServerRequest,Optional<org.springframework.core.io.Resource>> lookupFunction, BiConsumer<org.springframework.core.io.Resource,org.springframework.http.HttpHeaders> headersConsumer)`
Route to resources using the provided lookup function.
`void`
RouterFunctions.Visitor.`resources(Function<ServerRequest,Optional<org.springframework.core.io.Resource>> lookupFunction)`
Receive notification of a resource router function.