Hello.

Can implements method the checkNotModified in org.springframework.web.servlet.function.ServerRequest?

Thank you!

Comment From: poutsma

I've added checkNotModified to ServerRequest in both WebFlux.fn and WebMvc.fn.

However, given the programming model of the functional endpoints, where you return a response instead of having the response available as a method parameter, the method does not return a boolean, but rather a response wrapped in a Mono/Optional. If the resource has not been changed, the not-modified response can be returned directly; if the resource has changed, the user can create a corresponding response using switchIfEmpty/orElse(Get).

Check out the method javadoc to see an example.